normal = 0,
/++
- $(BLUE Linux-Only)
+ $(BLUE Linux,OpenBSD-Only)
Uses $(D CLOCK_BOOTTIME).
+/
precise = 3,
/++
- $(BLUE Linux,Solaris-Only)
+ $(BLUE Linux,OpenBSD,Solaris-Only)
Uses $(D CLOCK_PROCESS_CPUTIME_ID).
+/
second = 6,
/++
- $(BLUE Linux,Solaris-Only)
+ $(BLUE Linux,OpenBSD,Solaris-Only)
Uses $(D CLOCK_THREAD_CPUTIME_ID).
+/
threadCPUTime = 7,
/++
- $(BLUE FreeBSD-Only)
+ $(BLUE DragonFlyBSD,FreeBSD,OpenBSD-Only)
Uses $(D CLOCK_UPTIME).
+/
precise = 3,
second = 6,
}
+else version (OpenBSD) enum ClockType
+{
+ normal = 0,
+ bootTime = 1,
+ coarse = 2,
+ precise = 3,
+ processCPUTime = 4,
+ second = 6,
+ threadCPUTime = 7,
+ uptime = 8,
+}
else version (DragonFlyBSD) enum ClockType
{
normal = 0,
case second: assert(0);
}
}
+ else version (OpenBSD)
+ {
+ import core.sys.openbsd.time;
+ with(ClockType) final switch (clockType)
+ {
+ case bootTime: return CLOCK_BOOTTIME;
+ case coarse: return CLOCK_MONOTONIC;
+ case normal: return CLOCK_MONOTONIC;
+ case precise: return CLOCK_MONOTONIC;
+ case processCPUTime: return CLOCK_PROCESS_CPUTIME_ID;
+ case threadCPUTime: return CLOCK_THREAD_CPUTIME_ID;
+ case uptime: return CLOCK_UPTIME;
+ case second: assert(0);
+ }
+ }
else version (DragonFlyBSD)
{
import core.sys.dragonflybsd.time;