We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3863ac5 commit 7c0ffc7Copy full SHA for 7c0ffc7
VG Music Studio/Util/TimeBarrier.cs
@@ -29,11 +29,10 @@ public void Wait()
29
double totalElapsed = _sw.ElapsedTicks * _timerInterval;
30
double desiredTimeStamp = _lastTimeStamp + _waitInterval;
31
double timeToWait = desiredTimeStamp - totalElapsed;
32
- if (timeToWait < 0)
+ if (timeToWait > 0)
33
{
34
- timeToWait = 0;
+ Thread.Sleep((int)(timeToWait * 1000));
35
}
36
- Thread.Sleep((int)(timeToWait * 1000));
37
_lastTimeStamp = desiredTimeStamp;
38
39
0 commit comments