Skip to content
Snippets Groups Projects

Resolves #160 by resync of clock

Merged Nicolas Pope requested to merge bug/160/clocksync into master
1 file
+ 3
4
Compare changes
  • Side-by-side
  • Inline
@@ -61,10 +61,9 @@ static void waitTimePoint() {
@@ -61,10 +61,9 @@ static void waitTimePoint() {
}
}
// Still lots of time so do some idle jobs
// Still lots of time so do some idle jobs
while (msdelay >= 10 && sincelast != mspf) {
auto idle_job = jobs[kTimerIdle10].begin();
for (auto &j : jobs[kTimerIdle10]) {
while (idle_job != jobs[kTimerIdle10].end() && msdelay >= 10 && sincelast != mspf) {
j.job(now);
(*idle_job++).job(now);
}
now = get_time();
now = get_time();
msdelay = mspf - (now % mspf);
msdelay = mspf - (now % mspf);
}
}
Loading