[fpc-devel] Problem with Now() and time changed by ntpd
Sven Barth
pascaldragon at googlemail.com
Tue Nov 1 22:15:47 CET 2011
On 01.11.2011 14:03, Henry Vermaak wrote:
> Also, how cheap is this on Windows? Presumably they will also have to
> deal with potential system services running while updates fix daylight
> saving time changes? If they don't use shared memory for this, I'd wager
> that it's just as slow as libc localtime.
I've checked the Windows implementation. FPC's RTL in the end calls the
function GetLocalTime which - as the name suggests - already returns the
time that belongs to the current timezone (and DST settings). The
implementation of that is cheap as well: the current bias from UTC is
located in a shared memory section which the kernel maps into each
running process. Thus only that one location (and the location were this
setting is saved) is changed if a change of the timezone or the DST
happens. So this is very cheap.
Note: for this I've looked into the source of ReactOS.
Regards,
Sven
More information about the fpc-devel
mailing list