linux high performance timer
Hi guys,
Just wondering if there''s something similar to QueryPerformanceCounter/QueryPerformanceFrequency generally supported by the Linux platform?
I''ve looked into the RDTSC instruction, but would like to steer away from x86 specific stuff if possible.
Regards,
Tom L
The traditional *NIX timing function is gettimeofday, with a potential nanosecond accuracy.
[ Start Here ! | How To Ask Smart Questions | Recommended C++ Books | Free C++ IDE. ]
[ Header Files | File Format Docs | LNK2001 | C++ STL Doc | STLPort | Boost C++ Lib ]
[ Start Here ! | How To Ask Smart Questions | Recommended C++ Books | Free C++ IDE. ]
[ Header Files | File Format Docs | LNK2001 | C++ STL Doc | STLPort | Boost C++ Lib ]
Other functions you might be interested in are clock_gettime (potential nanosecond accuracy; standard POSIX, but relatively new) and ftime (millisecond accuracy; standard POSIX).
The gettimeofday function that Fruny mentioned is standard for BSD (but supported in Linux and many BSD derived unixes), if you''re interested.
The gettimeofday function that Fruny mentioned is standard for BSD (but supported in Linux and many BSD derived unixes), if you''re interested.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement