Bug 335 – incorrect std.c.time.CLK_TCK value (Linux)

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
phobos
Product
D
Version
D1 (retired)
Platform
x86
OS
Linux
Creation time
2006-09-10T04:25:00Z
Last change time
2014-02-15T13:29:11Z
Keywords
patch
Assigned to
bugzilla
Creator
thomas-dloop

Comments

Comment #0 by thomas-dloop — 2006-09-10T04:25:28Z
CLK_TCK's value is dependent on Linux's kernel configuration. const clock_t CLK_TCK = 1000; should be /// The value for real clock ticks per second for the system. version(Windows) { const clock_t CLK_TCK = 1000; } else version (linux) { const clock_t CLK_TCK = cast(clock_t) sysconf(2); private extern(C) int sysconf(int); } else { static assert(0); }
Comment #1 by bugzilla — 2006-09-19T15:31:09Z
Fixed in DMC 0.167.