|
-
October 11th, 2002, 04:37 AM
#4
Thanks,
I can use clock() for this particular application. The needed precision is low. I had forgotten that this standard ANSI function exists (CLOCKS_PER_SEC is ANSI, header file is <time.h>).
Indeed ::GetTickCount() and the performance counter functions are Microsoft WIN32 API functions. I was hoping that the C or C++ compiler of GCC supports similar (non-ANSI) functions, especially high-frequency counters for higher-precision work. Remember, various incarnations of GCC supports such functions as ::sleep() and ::nanosleep() which are non-ANSI.
Maybe someone has experience with high-precision timers in GCC and can provide additional information. I do not want to do anything like read the Pentium time stamp counter since I would prefer to remain CPU-independent for this particular application.
Again, thanks.
Sincerely,
Chris.
You're gonna go blind staring into that box all day.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|