PC Review


Reply
Thread Tools Rate Thread

Current Time in milliseconds

 
 
Oz
Guest
Posts: n/a
 
      15th May 2004
Hi all,

I'm using an HP iPAQ 5500 and I need to get the current time down to the
millisecond. Date.Now returns time down to the second, but that is not
accurate enough for my needs.

I can't use a timer since I need to keep track of time through
application/windows restarts.

Any ideas?

TIA.
Oz
 
Reply With Quote
 
 
 
 
Chris Tacke, eMVP
Guest
Posts: n/a
 
      16th May 2004
I've yet to see a CE device that support the SystemTime down to the
millisecond. In fact the desktop is only down to about 80ms. If you need a
ms timer, use the system tick, or a performance counter for even finer
resolution.


-Chris

"Oz" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Hi all,
>
> I'm using an HP iPAQ 5500 and I need to get the current time down to the
> millisecond. Date.Now returns time down to the second, but that is not
> accurate enough for my needs.
>
> I can't use a timer since I need to keep track of time through
> application/windows restarts.
>
> Any ideas?
>
> TIA.
> Oz



 
Reply With Quote
 
Oz
Guest
Posts: n/a
 
      18th May 2004

The issue is not with the timers at all. I need to be able to re-sync
with the system clock after a soft/hard reset so I need to get better
than 1 second resolution of the current time. 100 (maybe even 200) ms
resolution would be adaquate.

System.Environment.Ticks is of no value since it resets every time you
reboot and the app has to work between soft resets.

I've thought about starting a number of timers ( maybe 1 timer every
50-100 ms ) and checking which is the first to tick over to the next
second and using that one as a re-sync though this sounds a bit nasty.

Or starting a performance counter that polled the time every 10 ms until
the second ticked over and then kicked off a timer.

Is this just an OEM (HP iPAQ 5500) limitation that has no real solution?

Thanks again.
Oz

Chris Tacke, eMVP wrote:
> I've yet to see a CE device that support the SystemTime down to the
> millisecond. In fact the desktop is only down to about 80ms. If you need a
> ms timer, use the system tick, or a performance counter for even finer
> resolution.
>
>
> -Chris
>
> "Oz" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
>
>>Hi all,
>>
>>I'm using an HP iPAQ 5500 and I need to get the current time down to the
>>millisecond. Date.Now returns time down to the second, but that is not
>>accurate enough for my needs.
>>
>>I can't use a timer since I need to keep track of time through
>>application/windows restarts.
>>
>>Any ideas?
>>
>>TIA.
>>Oz

>
>
>

 
Reply With Quote
 
Chris Tacke, eMVP
Guest
Posts: n/a
 
      18th May 2004
Yes, it's an OEM limitation (and common among all CE OEMs that I've used).
While the SYSTEMTIME structure itself has a milliseconds field, I've never
seen a kernel implementation that actually used it. Not saying that it
can't be done, just that I've never seen it.

--
Chris Tacke, eMVP
Co-Founder and Advisory Board Member
www.OpenNETCF.org
---
---
Principal Partner
OpenNETCF Consulting
www.OpenNETCF.com



"Oz" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
>
> The issue is not with the timers at all. I need to be able to re-sync
> with the system clock after a soft/hard reset so I need to get better
> than 1 second resolution of the current time. 100 (maybe even 200) ms
> resolution would be adaquate.
>
> System.Environment.Ticks is of no value since it resets every time you
> reboot and the app has to work between soft resets.
>
> I've thought about starting a number of timers ( maybe 1 timer every
> 50-100 ms ) and checking which is the first to tick over to the next
> second and using that one as a re-sync though this sounds a bit nasty.
>
> Or starting a performance counter that polled the time every 10 ms until
> the second ticked over and then kicked off a timer.
>
> Is this just an OEM (HP iPAQ 5500) limitation that has no real solution?
>
> Thanks again.
> Oz
>
> Chris Tacke, eMVP wrote:
> > I've yet to see a CE device that support the SystemTime down to the
> > millisecond. In fact the desktop is only down to about 80ms. If you

need a
> > ms timer, use the system tick, or a performance counter for even finer
> > resolution.
> >
> >
> > -Chris
> >
> > "Oz" <(E-Mail Removed)> wrote in message
> > news:(E-Mail Removed)...
> >
> >>Hi all,
> >>
> >>I'm using an HP iPAQ 5500 and I need to get the current time down to the
> >>millisecond. Date.Now returns time down to the second, but that is not
> >>accurate enough for my needs.
> >>
> >>I can't use a timer since I need to keep track of time through
> >>application/windows restarts.
> >>
> >>Any ideas?
> >>
> >>TIA.
> >>Oz

> >
> >
> >



 
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
Time in format hh:mm:ss.milliseconds Angus Microsoft Excel Discussion 8 7th Mar 2009 09:13 PM
Time milliseconds format Kaykayme Microsoft Excel Programming 6 29th Oct 2008 05:44 PM
Display time to the milliseconds Patrick C. Simonds Microsoft Excel Discussion 5 29th Oct 2008 05:16 PM
Getting the time down to milliseconds =?Utf-8?B?TmV2aWUgYW5kIFBoaWw=?= Microsoft Access Form Coding 7 2nd Jan 2005 10:21 PM
system time in milliseconds sarab Microsoft Windows 2000 Developer 1 1st Apr 2004 02:40 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 08:50 AM.