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

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

There is a newer version: 17-0.28.3
Show 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 - 2025 Weber Informatics LLC | Privacy Policy