When time goes backwards, cope as best we can by simply not throttling.
git-svn-id: https://samskivert.googlecode.com/svn/trunk@1675 6335cc39-0255-0410-8fd6-9bcaacd3b74c
This commit is contained in:
@@ -117,7 +117,10 @@ public class Throttle
|
||||
{
|
||||
// if the oldest operation was performed less than _period ago, we
|
||||
// need to throttle
|
||||
return (timeStamp - _ops[_lastOp]) < _period;
|
||||
long elapsed = timeStamp - _ops[_lastOp];
|
||||
// if negative time elapsed, we must be running on windows.
|
||||
// Let's just cope by not throttling.
|
||||
return (elapsed >= 0 && elapsed < _period);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user