Re: What could be the best for Timing

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance

From: Joseph M. Newcomer (newcomer_at_flounder.com)
Date: 05/12/04


Date: Wed, 12 May 2004 12:56:56 -0400

Depends on what they mean by "timing", which is part of why I asked about wall-clock time.
Windows is not a real-time system, and it is an illusion to pretend that it is. The
question was a bit vague, because it asked about "timing", which usually means
"performance measurement". If the questioner wanted to be unambiguous, the question might
have said "time-stamping events with an accurate timestamp representing their arrival
time" or "meeting hard realtime deadlines". These are quite different questions. I
interpreted the question as a performance measurement question.

Also, venturecom (www.vci.com) has a true realtime operating system that runs Windows as a
low-priority realtime task. My information is out-of-date, but they used to claim that
they could dispatch, from interrupt to running in your DLL, in 200 microseconds. I suspect
on modern processors it would be substantially faster, only because I believe my data was
gathered in the pre-1GHz processor era. I know nothing of their product other than what
I've picked up at places like WinHEC and in reading their Web site (they have licensed the
Windows source from Microsoft, if I recall correctly). Also, they charge a per-unit
royalty for distribution, but that's not too much out of line with what many other
realtime OS vendors charge.
                                        joe

On Wed, 12 May 2004 02:14:57 GMT, no-one@dont-mail-me.com (Robert Scott) wrote:

>On Tue, 11 May 2004 19:28:56 -0400, Joseph M. Newcomer
><newcomer@flounder.com> wrote:
>
>>QueryPerformanceCounter. Of course, with timing as sloppy as 100ms, pretty much anything
>>would work.
>
>Not necessarily. QueryPerformanceCounter does provide sub-microsecond
>resolution, but attaching that reading to a specific event with an
>uncertainty of less than 100 msec. is not always possible. Your
>application program can be interrupted for more than 100 msec.
>immediately before or immediately after you fetch that precise
>reading, so you don't always get the precision that you think you are
>getting. If good precision 99.9% of the time is good enough, then go
>ahead and use just about anything. But if you need precision 100% of
>the time, then you will have to write a device driver, or use
>something other than Windows.
>
>
>-Robert Scott
> Ypsilanti, Michigan
>(Reply through this forum, not by direct e-mail to me, as automatic reply address is fake.)

Joseph M. Newcomer [MVP]
email: newcomer@flounder.com
Web: http://www.flounder.com
MVP Tips: http://www.flounder.com/mvp_tips.htm



Relevant Pages

  • Re: What could be the best for Timing
    ... >>Our group try to find the way for timing issue. ... The time measurement must be ... > Impossible with a Windows application program. ... precision to 1 ms, problem solved. ...
    (microsoft.public.vc.mfc)
  • Re: Real Operating Systems That Take Control
    ... > other hardware i/o. ... When a thread runs at realtime and eats up the CPU, ... working applications for windows. ... and I'd certainly rather be on NT4 than win9x... ...
    (alt.lang.asm)
  • Re: LuxAsm questions
    ... Beth, when timing stuff, you should discard all but the fastest ... Dunno how bad it is to link in libc shared, ... If you care about desktop machines at home, it's like "x86 + windows". ... If you start writing more "funky" ...
    (alt.lang.asm)
  • Re: A cheapo Acer laptop matches Macbook Pro in benchmarks!
    ... Why did he omit window resizing which, by your own admission, favors ... For the same reason that "Mouse Precision" was included. ... I am sure people resized windows in the course of the operations ... For the same reason that "Mouse Precision" was singled out. ...
    (comp.sys.mac.advocacy)
  • Re: How to make Windows XP last for the next seven years
    ... is a hundred times more memory that a typical operating system ... Windows 3.1, Linux, Windows 98SE or whatever..... ... I've been playing Collector's Edition Doom, a program from DOS days but updated to Windows. ... It seems that not every timing problem was addressed, notable the loss of precision placement and targeting. ...
    (soc.retirement)