Hacker News new | ask | show | jobs
by hmpc 4161 days ago
Unless I misunderstood, that's what the TIMER_ABSTIME option is for. This is actually what I use for soft real-time loops, when I'm concerned about both drift and jitter.
1 comments

Ok thanks, I reread it, that seems to be the case! I hope the seconds field is honored along with ns. WinCE had a bug where they used a long. If latency made your call for a small interval occur after the interval had elapsed, you slept for 19.5 minutes instead (nearly a full count). Combining the ns with a second counter should be enough bits to avoid that.