Advertisement

timeGetTime counterpart of Linux ?

Started by July 23, 2003 09:45 PM
1 comment, last by browny 21 years, 3 months ago
what are the equivalent functions of timeGetTime() and GetTickCount() in linux ?
Z
Look up clock_gettime ("new" POSIX) or gettimeofday (BSD and Linux only, for the most part).

Advertisement
The standard C function is clock() declared in time.h or ctime for C++.

It''s suppose to return millisecond or even microseconds - the define CLOCKS_PER_SEC tells you the actual precision of the clock.

Please try this on your system, on RH9 I get 0 from clock() every time I call it.
- The trade-off between price and quality does not exist in Japan. Rather, the idea that high quality brings on cost reduction is widely accepted.-- Tajima & Matsubara

This topic is closed to new replies.

Advertisement