Timer implementation.