[Issue 13433] Request: Clock.currTime option to use CLOCK_REALTIME_COARSE / CLOCK_REALTIME_FAST

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Wed Apr 29 19:31:35 PDT 2015


https://issues.dlang.org/show_bug.cgi?id=13433

--- Comment #14 from github-bugzilla at puremagic.com ---
Commits pushed to master at https://github.com/D-Programming-Language/druntime

https://github.com/D-Programming-Language/druntime/commit/8e29e0621b074a8d368b4d7d344281adb7a91e54
Add ClockType enum to core.time for issue# 13433.

This adds an enum for indicating which type of clock to use when it's
appropriate for a time function to have multiple options for the source
clock. In the case of MonoTime, to make that work cleanly, the
implementation of MonoTime has become MonoTimeImpl, templated on
ClockType, and MonoTime has become an alias to
MonoTimeImpl!(ClockType.normal). In the case of SysTime (in a separate
PR), that will a default template argument to Clock.currTime and SysTime
will be unaffected (because in MonoTime's case, the clock that it came
from is integral to the type, whereas in SysTime's case, it doesn't
matter after the SysTime has been initialized).

https://github.com/D-Programming-Language/druntime/commit/bcfc36b3ca5a229c751c972c607fee57d4febcb2
Merge pull request #990 from jmdavis/13433

Add ClockType enum to core.time for issue# 13433.

--


More information about the Digitalmars-d-bugs mailing list