Re: Get system time in Milliseconds
- From: "<ctacke/>" <ctacke[at]opennetcf[dot]com>
- Date: Tue, 20 Nov 2007 07:58:51 -0600
The point we're all trying to make is that there is no simple way to do this
(if there was, the OEM would have filled in the seconds field in the
SystemTime for you).
The general premise for getting it working is at some point after startup
you need to watch the clock in a tight loop. When the second rolls over,
you need to use GetTickCount to find out your ms offset at the second
rollover. The last 3 digits are what's important.
From that point on, when you need the time with milliseconds it requiresthat you get the system time and then call GetTickCount and use modulo
division that offset to find out how far (in milliseconds) you are from the
second rollover.
--
Chris Tacke, eMVP
Join the Embedded Developer Community
http://community.opennetcf.com
"birinder via PocketPCJunkies.com" <u37616@uwe> wrote in message
news:7b7a153cef793@xxxxxx
Dear all
Thanks for your response and support.
GetTickCount() return milliseconds since the PC restart. So still i am not
able to get the correct (almost) time of the clock with Millisecond
resolution. So can anyone suggest how to read the software realtime clock,
and how to sysnc this will hardware RTC periodically.
Thanks and best regards.
Birindder
--
Message posted via PocketPCJunkies.com
http://www.pocketpcjunkies.com/Uwe/Forums.aspx/wince-programming/200711/1
.
- Follow-Ups:
- Re: Get system time in Milliseconds
- From: birinder via PocketPCJunkies.com
- Re: Get system time in Milliseconds
- References:
- Get system time in Milliseconds
- From: birinder via PocketPCJunkies.com
- Re: Get system time in Milliseconds
- From: Jeff Henkels
- Re: Get system time in Milliseconds
- From: birinder via PocketPCJunkies.com
- Get system time in Milliseconds
- Prev by Date: Re: Get system time in Milliseconds
- Next by Date: Re: wince 6 backward compatibility
- Previous by thread: Re: Get system time in Milliseconds
- Next by thread: Re: Get system time in Milliseconds
- Index(es):
Relevant Pages
|