All Downloads are FREE. Search and download functionalities are using the official Maven repository.

us.ihmc.scs2.simulation.bullet.physicsEngine.PrivateAnimationTimer Maven / Gradle / Ivy

The newest version!
package us.ihmc.scs2.simulation.bullet.physicsEngine;

import javafx.animation.AnimationTimer;

import java.util.function.LongConsumer;

/**
 * Allows to easily construct animation timers privately or to use multiple timers in a class.
 */
public class PrivateAnimationTimer extends AnimationTimer
{
   private final LongConsumer handler;

   public PrivateAnimationTimer(LongConsumer handler)
   {
      this.handler = handler;
   }

   @Override
   public void handle(long now)
   {
      handler.accept(now);
   }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy