On Friday 09 of December 2011 16:10:54 Sven Barth wrote: > Am 09.12.2011 15:37, schrieb zeljko: > > On Friday 09 of December 2011 14:52:56 Sven Barth wrote: > > > Am 09.12.2011 13:30, schrieb Michael Schnell: > > > > On 12/09/2011 01:17 PM, Felipe Monteiro de Carvalho wrote: > > > >> I would like to define it like this: "FPGetTickCount returns the > > > >> > > > >> amount of ticks since an unspecified initial time. This initial > > > >> time > > > >> > > > >> is unknown, but is fixed for the entire duration of the > > > >> application. > > > >> > > > >> Ticks are time intervals and all of them have the same duration, > > > >> but > > > >> > > > >> their exact meaning in terms of real world units like milliseconds > > > >> is > > > >> > > > >> unspecified. FPGetTickCount is not affected by timezones and also > > > >> not > > > >> > > > >> by the user changing the system clock." So it matches > > > >> > > > >> Windows.GetTickCount well but still is flexible enough to be > > > >> > > > >> implemented in other platforms. > > > > > > > > What if the PC is polling a time server or similar ? IMHO > > > > FPGetTickCount > > > > > > should not be affected by such interference. This rules out using OS > > > > > > > > time API calls. > > > > > > The description of Felipe mathes Windows' GetTickCount (number of > > > > > > milliseconds since system start) and Linux' MONOTONIC_RAW time (or > > > > > > however it is called exactly). So I don't see why this should rule out > > > > > > OS time API calls... > > > > No, MONOTONIC_RAW is introduced in 2.6.26 afair, so it won't run on > > older kernels. > > My comment was less for which timer type we should support, but more to > have a argument for what Felipe said.
Ok, also I forgot to mention that MONOTNIC_RAW isn't interrupted by ntp but MONOTONIC IS so it's big diff. zeljko
_______________________________________________ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel