Results 1 to 3 of 3

Thread: Milliseconds Accuracy...

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    May 2002
    Posts
    142

    Milliseconds Accuracy...

    HELP.....

    I need to know the most accurate way of getting Milliseconds.
    I am performing reading from a serial port and need to know the exact time that data was read in (to the nearest 5 milliseconds).

    I've tried GetTickCount(), System.Environment.TickCount,
    but with both of them, my data looks like this:

    448222813726835
    448222813726835
    448222813726835
    448222813726845
    448222813726845
    448222813726856
    448222813726856
    448222813726856
    448222813726866
    448222813726866
    448222813726876
    448222813726876
    448222813726876
    448222813726886
    448222813726886

    This tells me that it must be rounding or is not accurate enough because although it says, the first number 3 times(448222813726835 ) it is probably not really taking 3 or 4 readings at the same time.

    Any suggestion???
    Cheers,
    Bebandit

  2. #2
    Addicted Member Dmyze's Avatar
    Join Date
    Mar 2002
    Location
    Seattle
    Posts
    160
    have you tried Now.Ticks ?
    -Daryl
    "Two More Rolls of Duct tape, and the world is mine!"
    VB.NET Guru

  3. #3
    Your Ad Here! Edneeis's Avatar
    Join Date
    Feb 2000
    Location
    Moreno Valley, CA (SoCal)
    Posts
    7,339
    On Now.Milliseconds

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width