DotNetNewsgroup.com  
web access to complete list of Microsoft.NET newsgroups
   home   |   control panel login   |   archive  |  
 
  carried group
academic
adonet
aspnet
aspnet.announcements
aspnet.buildingcontrols
aspnet.caching
aspnet.datagridcontrol
aspnet.mobile
aspnet.security
aspnet.webcontrols
aspnet.webservices
assignment_manager
datatools
dotnet.distributed_apps
dotnet.general
dotnet.myservices
dotnet.nternationalization
dotnet.scripting
dotnet.security
dotnet.vjsharp
dotnet.vsa
dotnet.xml
dotnetfaqs
framework
framework.clr
framework.compactframework
framework.component_services
framework.controls
framework.databinding
framework.drawing
framework.enhancements
framework.interop
framework.odbcnet
framework.performance
framework.remoting
framework.sdk
framework.setup
framework.webservices
framework.windowsforms
framework.wmi
frwk.windowsforms.designtime
lang.csharp
lang.jscript
lang.vb
lang.vb.controls
lang.vb.data
lang.vb.upgrade
lang.vc
lang.vc.libraries
  
 
start date: Sat, 28 Jul 2007 18:48:46 -0000,    posted on: microsoft.public.dotnet.framework.compactframework        back       

Thread Index
  1    silverfox
          2    ctacke/ ctacke[at]opennetcf[dot]com
          3    silverfox


How to get accurate elapsed time ?   
I was surprised to find that DateTime.Now.Ticks on my Pocket PC always
returns a value like 633212192210000000. And about 4 seconds later the
value returned is 633212192250000000.   You always get seven zeros on
the end, meaning that there are no significant digits past the
seconds.  I need at lease tenth second accuracy for my application.
Is there a way?  I am using VB,  for what it is worth.
Date:Sat, 28 Jul 2007 18:48:46 -0000   Author:  

Re: How to get accurate elapsed time ?   
DataTime.Now on most Windows CE devices is only valid to the second.  If you 
need sub-second resolution, use Environment.TickCount, which is milliseconds 
(watch for wrap).  If you need even finere, the P/Invoke 
QueryPerformanceCounter.


-- 

Chris Tacke, Embedded MVP
OpenNETCF Consulting
Managed Code in an Embedded World
www.OpenNETCF.com



"silverfox"  wrote in message 
news:1185648526.721441.325200@i13g2000prf.googlegroups.com...

>I was surprised to find that DateTime.Now.Ticks on my Pocket PC always
> returns a value like 633212192210000000. And about 4 seconds later the
> value returned is 633212192250000000.   You always get seven zeros on
> the end, meaning that there are no significant digits past the
> seconds.  I need at lease tenth second accuracy for my application.
> Is there a way?  I am using VB,  for what it is worth.
> 
Date:Sat, 28 Jul 2007 15:30:06 -0500   Author:  

Re: How to get accurate elapsed time ?   
On Jul 28, 1:30 pm, "<ctacke/>" <ctacke[at]opennetcf[dot]com> wrote:

> DataTime.Now on most Windows CE devices is only valid to the second.  If you
> need sub-second resolution, use Environment.TickCount, which is milliseconds
> (watch for wrap).  If you need even finere, the P/Invoke
> QueryPerformanceCounter.
>
> --
>
> Chris Tacke, Embedded MVP
> OpenNETCF Consulting
> Managed Code in an Embedded Worldwww.OpenNETCF.com
>
> "silverfox"  wrote in message
>
> news:1185648526.721441.325200@i13g2000prf.googlegroups.com...
>
> >I was surprised to find that DateTime.Now.Ticks on my Pocket PC always
> > returns a value like 633212192210000000. And about 4 seconds later the
> > value returned is 633212192250000000.   You always get seven zeros on
> > the end, meaning that there are no significant digits past the
> > seconds.  I need at lease tenth second accuracy for my application.
> > Is there a way?  I am using VB,  for what it is worth.



Perfect!  I knew that there must be a way and I was pretty certain
that someone on this list would know what it was.  Thanks!
Date:Sun, 29 Jul 2007 04:08:33 -0000   Author:  

Google
 
Web dotnetnewsgroup.com


COPYRIGHT ?2005, EUROFRONT WORLDWIDE LTD., ALL RIGHT RESERVE  |   Contact us