Tom Van Baak <[email protected]> wrote: > > Try using clock() instead of gettimeofday_in_millisecs(). The former > nicely increments with CLOCKS_PER_SEC resolution and is immune > from UTC, timezones, and leap seconds. At least it does on windows. > Can someone comment on unix/linux?
clock() is broken on Windows in order to be backwards-compatible with DOS. It is supposed to return the time the process has spent running on the CPU, which is traditionally rather slower than real time, though it may be faster for a multithreaded process on a multicore computer. Since DOS didn't multitask it just returned elapsed time since the process started, and Windows has retained this braindamaged semantics. Tony. -- f.anthony.n.finch <[email protected]> http://dotat.at/ Trafalgar: Variable or easterly, 3 or 4, increasing 5 to 7 for a time in far southeast of Trafalgar. Slight or moderate. Showers, fog patches. Moderate or good, occasionally very poor. _______________________________________________ LEAPSECS mailing list [email protected] http://six.pairlist.net/mailman/listinfo/leapsecs
