mirror of
https://github.com/TomHarte/CLK.git
synced 2025-01-27 06:35:04 +00:00
Added an extra safety rail.
This commit is contained in:
parent
21cfb39ed9
commit
f13d7ed6f4
@ -38,7 +38,7 @@
|
||||
{
|
||||
dispatch_async(_serialDispatchQueue, ^{
|
||||
NSTimeInterval timeInterval = [NSDate timeIntervalSinceReferenceDate];
|
||||
if(_previousTimeInterval > DBL_EPSILON)
|
||||
if(_previousTimeInterval > DBL_EPSILON && timeInterval > _previousTimeInterval)
|
||||
{
|
||||
NSTimeInterval timeToRunFor = timeInterval - _previousTimeInterval;
|
||||
double cyclesToRunFor = timeToRunFor * self.clockRate + _cyclesError;
|
||||
|
Loading…
x
Reference in New Issue
Block a user