[fpc-devel] Problem with Now() and time changed by ntpd

Martin Schreiber mse00000 at gmail.com
Wed Nov 2 23:45:53 CET 2011


On Wednesday 02 November 2011 17.43:56 Martin Schreiber wrote:
> On Wednesday 02 November 2011 17.13:49 Jonas Maebe wrote:
> > Yes, the result slower, but it's also correct (as in "it makes sure
> > that the actual local time is returned"). Just like all UTF-16 code in
> > the RTL is slower than what Martin Schreiber would like, and we didn't
> > change it to UCS-2 when he asked to do so for speed reasons.
> 
> ???
> I never asked this. I asked not to use new code page aware stringtype
> instead of pre cpstrnew UnicodeString, not to use 16 bit strings in
> component names and the like and not to use non ASCII characters in RTTI
> and Pascal identifiers.
> I fully agree with your argumentation about Now(). MSEgui already has a
> nowutc() function, I'll add nowlocal() which will use mselibc on Linux.
> 
The results with 10'000'000 calls:

FPC Now() MSEgui nowutc() MSEgui nowlocal()

Linux
  15.29s           3.39s             3.57s

Windows
  10.00s           1.22s             1.37s

Martin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-devel/attachments/20111102/7d72d809/attachment.html>


More information about the fpc-devel mailing list