D-Programming-Language/druntime — pull request #88 by fugalh (2011-11-24 19:14:22+00:00)
Title: Fallback to gettimeofday() as needed

On some linux kernels, e.g. x86_64 kernels, clock_gettime() has poor
resolution (1ms on my 2.6.33 kernel). If clock_getres() returns a
resolution poorer than we expect from gettimeofday() (microseconds) then
use geittimeofday() instead.

Also fix a casting bug that would make to!("seconds", float) truncate
unnecessarily.