Hi, If I understand correctly SystemTime on Linux uses clock_gettime, it would be nice if it had a way to get the resolution of the clock it was using - in Linux's case this is given by clock_getres
Imo before we add any more surface to std's time API it there needs a plan where we want to go, not just adding things piece by piece. E.g. people are also asking for sleep_until
, but then which clock will be used for sleeping? So we might need a notion of ClockSource
where a resolution method could make sense too.
There already are a bunch of warts and other open questions such
- should
Instant
should include or exclude suspend time - can there be a ZERO or EPOCH for instants
Yes, I agree - I'm not saying this needs to go in urgently; just that it's needed at some point - if that's when a ClockSource happens then that makes sense to me. Although the fact that the docs have to point out the resolution is system dependent without telling you what to do about it, is a good indication it's needed.
This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.