IUIAnimationTimer interface

Defines an animation timer, which provides services for managing animation timing.


The IUIAnimationTimer interface has these methods.

Method Description
IUIAnimationTimer::Disable Disables the animation timer.
IUIAnimationTimer::Enable Enables the animation timer.
IUIAnimationTimer::GetTime Gets the current time.
IUIAnimationTimer::IsEnabled Determines whether the timer is currently enabled.
IUIAnimationTimer::SetFrameRateThreshold Sets the frame rate below which the timer notifies the application that rendering is too slow.
IUIAnimationTimer::SetTimerEventHandler Specifies a timer event handler.
IUIAnimationTimer::SetTimerUpdateHandler Specifies a timer update handler.


A timer helps to manage animation rendering by automatically indicating the passage of a small unit of time, called a tick. In turn, ticks can trigger animation rendering or other animation events. Each animation timer provides timing for a single animation manager.

The timing system is designed to provide the necessary timing services needed to support animations and does not require applications to play an explicit role in generating the ticks. The animation timer can be set up to automatically update the animation manager for each tick without application-side handling.

An application may not need to use a timer with Windows Animation, depending on the graphics platform it is using. For example, an application drawing with Direct2D or Direct3D can synchronize to monitor's refresh rate, yielding very smooth animation. However, such applications may still find the IUIAnimationTimer interface useful for its GetTime method, which returns an accurate system time in UI_ANIMATION_SECONDS, the units used throughout the Windows Animation API.


For an example that creates the animation timer object, see Create the Main Animation Objects.


Windows version Windows 7, Windows Vista and Platform Update for Windows Vista [desktop apps | UWP apps] None supported
Target Platform Windows
Header uianimation.h

See Also