[PATCH 2/2] msvcrt: Cache dstflag value in _ftime64.
21 Dec
2018
21 Dec
'18
10:41 a.m.
Signed-off-by: Piotr Caban <piotr(a)codeweavers.com> --- dlls/msvcrt/time.c | 30 ++++++++++++++++++++---------- 1 file changed, 20 insertions(+), 10 deletions(-)
21 Dec
21 Dec
11 a.m.
Hi Piotr, On 21/12/18 9:41 pm, Piotr Caban wrote:
buf->dstflag = (GetTimeZoneInformation(&tzinfo) == TIME_ZONE_ID_DAYLIGHT ? 1 : 0); + time /= TICKSPERSEC * 60; + if(time != cache_timestamp) + { + cache_dstflag = GetTimeZoneInformation(&tzinfo) == TIME_ZONE_ID_DAYLIGHT ? 1 : 0; + cache_timestamp = time; + } + buf->dstflag = cache_dstflag;
You could use the function kernel32.GetDaylightFlag, which wouldn't require the caching. Alistair.
2551
Age (days ago)
2551
Last active (days ago)
1 comments
2 participants
participants (2)
-
Alistair Leslie-Hughes -
Piotr Caban