public abstract class AnimationTimer extends Object
AnimationTimerallows to create a timer, that is called in each frame while it is active. An extending class has to override the method
handle(long)which will be called in every frame. The methods
stop()allow to start and stop the timer.
|Constructor and Description|
Creates a new timer.
|Modifier and Type||Method and Description|
This method needs to be overridden by extending classes.
public abstract void handle(long now)
now- The timestamp of the current frame given in nanoseconds. This value will be the same for all
AnimationTimerscalled during one frame.
public void start()
public void stop()
AnimationTimers. It can be activated again by calling
Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved.