Results 1 to 12 of 12

Thread: Interesting page about time accuracy...

  1. #1

    Thread Starter
    PowerPoster sail3005's Avatar
    Join Date
    Oct 2000
    Location
    Chicago, IL, USA
    Posts
    2,340

    Interesting page about time accuracy...

    i found this page and thought it was really interesting about the accuracy of different timer methods. take a look. it's cool. perhaps it should go in the FAQ:

    http://www.geocities.com/hao510/w98timer/

    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA

  2. #2
    jim mcnamara
    Guest
    If you search the forums for 'high resolution timer' you'll find a couple of threads on this, discussing the mm timer as well as some newer timers.

  3. #3

    Thread Starter
    PowerPoster sail3005's Avatar
    Join Date
    Oct 2000
    Location
    Chicago, IL, USA
    Posts
    2,340
    cool, i'll look around

    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA

  4. #4
    Monday Morning Lunatic parksie's Avatar
    Join Date
    Mar 2000
    Location
    Mashin' on the motorway
    Posts
    8,169
    RTDSC or something similar is the thing to use on a Pentium

    It's the processor's internal clock, running at the speed of the processor (1.8GHz P4 anyone, that's a LOT of accuracy ).
    I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
    -- Linus Torvalds

  5. #5
    jim mcnamara
    Guest
    Ok I'm wai....ting .....

    For the C++ you're writing as we speak, to access it...... could be a long wait, huh?

  6. #6
    Monday Morning Lunatic parksie's Avatar
    Join Date
    Mar 2000
    Location
    Mashin' on the motorway
    Posts
    8,169
    Already written before, that's how I knew about it (I borrowed the main part of the code from something else, and made it into a slightly better class. There's a slight inaccuracy due to the function call overhead but if you cycle the tested code many times in the same timer stretch it's fine.
    I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
    -- Linus Torvalds

  7. #7
    Zaei
    Guest
    What about QueryPerformanceCounter() and QueryPerformanceFrequency()? They are supposed to give really good timing accuracy.

    Z.

  8. #8

    Thread Starter
    PowerPoster sail3005's Avatar
    Join Date
    Oct 2000
    Location
    Chicago, IL, USA
    Posts
    2,340
    thanks parksie, looks cool, but i get these errors. any ideas?

    Code:
    --------------------Configuration: main - Win32 Debug--------------------
    Linking...
    main.obj : error LNK2001: unresolved external symbol "public: __int64 __thiscall Ticker::Measure(void)" (?Measure@Ticker@@QAE_JXZ)
    main.obj : error LNK2001: unresolved external symbol "public: bool __thiscall Ticker::OnNT(void)" (?OnNT@Ticker@@QAE_NXZ)
    main.obj : error LNK2001: unresolved external symbol "public: bool __thiscall Ticker::HasRDTSC(void)" (?HasRDTSC@Ticker@@QAE_NXZ)
    main.obj : error LNK2001: unresolved external symbol "public: __thiscall Ticker::Ticker(void)" (??0Ticker@@QAE@XZ)
    Debug/main.exe : fatal error LNK1120: 4 unresolved externals
    Error executing link.exe.
    
    main.exe - 5 error(s), 0 warning(s)
    Probably something stupid

    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA

  9. #9
    Monday Morning Lunatic parksie's Avatar
    Join Date
    Mar 2000
    Location
    Mashin' on the motorway
    Posts
    8,169
    Did you compile Ticker.cpp as well? It should be included in the project
    I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
    -- Linus Torvalds

  10. #10

    Thread Starter
    PowerPoster sail3005's Avatar
    Join Date
    Oct 2000
    Location
    Chicago, IL, USA
    Posts
    2,340
    Doh! thanks, i knew it was something stupid.

    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA

  11. #11
    jim mcnamara
    Guest
    Hehe That worked. Got 'im to post it without begging....

  12. #12
    Monday Morning Lunatic parksie's Avatar
    Join Date
    Mar 2000
    Location
    Mashin' on the motorway
    Posts
    8,169
    Originally posted by jim mcnamara
    Hehe That worked. Got 'im to post it without begging....
    I think I already posted it before this thread anyway

    Ask long enough, and you'll get most of what I've ever written out of me
    I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
    -- Linus Torvalds

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