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:
ray
2005-07-08 01:08:05 +00:00
parent fa150109b7
commit b3ddec4a19
@@ -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);
}
/**