Mail Archives: djgpp/1998/01/30/21:45:32
I seem to be very good at posting to the newsgroup and less than 15
minutes later fixing the problem (even if I worked hours on it before).
Please disregard my earlier question. I have resolved the issue.
Thank you
Ryan P. Casey
re is a function that does what I need, any ideas?
: clock() (defined in time.h) returns the elapsed time in CLOCKS_PER_SEC
: since the first call to clock() in your program. uclock() (also defined
: in time.h) returns the elapsed time in UCLOCKS_PER_SEC since the first
: call to uclock() in your program. clock() is accurate to approximately
: 1/91 sec., while uclock() has a resolution of 1/1193180 seconds. Those
: constants are also defined in time.h.
I think (but could be wrong and can't test it at the moment) clock is
only accurate to 1/18.2 of a second. I thought CLOCKS_PER_SEC was 91
for convenience (being an integer value).
: Be aware that uclock() may not be 100% accurate under Windows 95,
: because it reprograms the system timer.
... and under Windows 95 you can still get a timer as accurate as
uclock by using the VTD VxD. I have some examples of how to do this,
and utility routines, at:
http://users.ox.ac.uk/~mert0407/downloads/vtd.zip
Since then I've been told what each timer means; what I refer to there
as `Timer 0' is the one which increases at the same speed as uclock's
value. `Timer 1' is in milliseconds. `Timer 2' is also in
milliseconds, but only increases when your program is timesliced.
Timers 0 and 1 count from when Windows is started; timer 2 counts from
when your program started (IIRC -- you can check this with the test
programs in vtd.zip).
--
Regards,
george DOT foot AT merton DOT oxford DOT ac DOT uk
- Raw text -