[D-runtime] Why is clock_gettime() commented out?

Jonathan M Davis jmdavisProg at gmx.com
Thu Nov 18 18:57:35 PST 2010


Is there a particular reason why clock_gettime() and various related posix C 
time functions are all commented out in core.sys.posix.time and 
core.sys.posix.signals? They're necessary to get either a realtime clock or a 
monotonic clock on Posix systems. It is true that that necessetates linking with 
-lrt, but as far as I know, all Posix systems should have librt, and the flag 
could be added to dmd.conf.

The stopwatch code in std.datetime is going to be potentially inaccurate without 
clock_gettime(), and the normal time code won't be quite as precise. Ideally, 
clock_gettime() would be available. Why are all of those time functions 
commented out? Were they causing problems somehow?

- Jonathan M Davis


More information about the D-runtime mailing list