On Friday 04 of November 2011 11:54:16 Graeme Geldenhuys wrote: > On 4 November 2011 12:39, Sven Barth <pascaldragon@g.....> wrote: > > "fpgettimeofday" itself simply calls the syscall "gettimeofday" of the > > kernel. > > I have another "experimental" version of epiktimer that uses the posix > clock_gettime() (instead of fpgettimeofday), which I had to implement > myself, because FPC doesn't include a fpXXX call in the unix or > baseunix units. clock_gettime() is apparently equivalent to the timing > calls of the Windows multi-media timing API's (many references on the > internet of this).
No, it's not equivalent for kernels < 2.6.28. CLOCK_MONOTONIC_RAW is included in >= 2.6.28 and that kind of clock isn't disturbed by ntpd changes and other related timer changes. > But from Michael's first comment in the below bug report, it seems > that kernel calls clock_gettime() and gettimeofday() returns the same > information - yet the latter is deprecated. So is using > fpgettimeofday() at the moment really bad? Based on all this > information - no. It is deprecated and at some point it will be removed from kernel, till then gettimeofday() returns same as clock_gettime(CLOCK_REALTIME), when it's removed from kernel fpc should be updated and that's it. Problem is that older versions of fpc won't work with such kernel. zeljko
_______________________________________________ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel