Timer preciseness


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 2 of 2

Thread: Timer preciseness

  1. #1
    Join Date
    Aug 2004
    Posts
    43,023

    Timer preciseness

    [Originally posted by Joshua Slone]

    Today I've been messing about with timers, seeing if if I had something happen time-based, how precise I could be. Most recently I had it grab the time using Timer many times in a row, and display the results. I noticed that it would show the same number several times, then go to another for several, and so on, the difference being 62.5 milliseconds. Is this truly as precise as it gets; down to a 16th of a second?

  2. #2
    Join Date
    Aug 2004
    Posts
    43,023

    Re:Timer preciseness

    [Originally posted by Joshua Slone]

    With further testing, I've found that Time seems much more precise than Timer. My new value for unique time difference is around 0.0115740741 milliseconds. 1/86400 of a second. This somehow seems appropriate, with 86400 being the number of seconds in a day. Is this correct? And if not, what is?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center