PC Review


Reply
Thread Tools Rate Thread

Can the GetSystemTime function lie?

 
 
TechoMad
Guest
Posts: n/a
 
      11th Dec 2008
Here is a good one - I have a program that reads the system clock a lot to
log timestamped events; this uses the GetSystemTime function. At seemingly
random times, the timestamps show a sudden "leap" into the future (2009
already) and sometimes back again to precisely the right time for the elapsed
duration of the leap. Yes, this is a highly multi-threaded program, but the
clock is never "reset", only ever read. Whilst my program is recording
"future" times, the OS applet and file-system are still using the correct
"today" date and time. Attempts to reproduce this under controlled
circumstances are unsuccessful, but this is not limited to any one computer
and has been seen over the last few years at random times. The smallest piece
of code showing the effect is a clock read, take difference to previous clock
time and print it - this takes a sudden leap into the future, but is only a
call to GetSystemTime. Any ideas?
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
GetSystemTime causes exception? Alan Williams-Key Microsoft VC .NET 2 24th Apr 2009 03:00 PM
I have a CLR function thet returns IEnumberable (a table) and it has a FillRow function. I am returning 10,000 integers from this function. Is there any way that I can preallocate the resulting table or give SQL server hint as to how many rows my fun DR Microsoft Dot NET Framework 1 22nd Nov 2007 11:36 AM
I have a CLR function thet returns IEnumberable (a table) and it has a FillRow function. I am returning 10,000 integers from this function. Is there any way that I can preallocate the resulting table or give SQL server hint as to how many rows my fun DR Microsoft ADO .NET 3 22nd Nov 2007 09:17 AM
I have a CLR function thet returns IEnumberable (a table) and it has a FillRow function. I am returning 10,000 integers from this function. Is there any way that I can preallocate the resulting table or give SQL server hint as to how many rows my fun DR Microsoft VB .NET 0 20th Nov 2007 04:24 AM
I have a CLR function thet returns IEnumberable (a table) and it has a FillRow function. I am returning 10,000 integers from this function. Is there any way that I can preallocate the resulting table or give SQL server hint as to how many rows my fun DR Microsoft Dot NET 0 20th Nov 2007 04:24 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 03:13 PM.