Package org.jzy3d.chart.controllers
Class RateLimiterByMilisecond
java.lang.Object
org.jzy3d.chart.controllers.RateLimiterByMilisecond
- All Implemented Interfaces:
RateLimiter
- Direct Known Subclasses:
RateLimiterAdaptsToRenderTime
- Author:
- martin
-
Field Summary
Modifier and TypeFieldDescriptionprotected static final double
protected double
protected boolean
protected TicToc
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
Return true if the action is allowed according to elapsed time.
-
Field Details
-
RATE_LIMIT
protected static final double RATE_LIMIT- See Also:
-
rateLimitMilis
protected double rateLimitMilis -
rateLimitStarted
protected boolean rateLimitStarted -
t
-
-
Constructor Details
-
RateLimiterByMilisecond
public RateLimiterByMilisecond() -
RateLimiterByMilisecond
public RateLimiterByMilisecond(double rateLimitMilis)
-
-
Method Details
-
rateLimitCheck
public boolean rateLimitCheck()Return true if the action is allowed according to elapsed time. Time starts counting at the first call to this method, so first call to a rate limit check will always succeed.- Specified by:
rateLimitCheck
in interfaceRateLimiter
- Returns:
-