Linux timing functions
Im new to linux and i need to write a timing function for my app.
I am used to the windows timeGetTime and dont know what lunix functions i should be using to accomplish the task.
Any suggestions?
Thx!
I use gettimeofday which is (as far as i know) the only standard way to get a time that has a granuality of less than a second.
struct timeval tv;
gettimeofday( &tv, 0);
returns the time in seconds and microseconds.
struct timeval {
long tv_sec; /* seconds */
long tv_usec; /* microseconds */
};
If anyone knows an even more accurate timer, let us know.
struct timeval tv;
gettimeofday( &tv, 0);
returns the time in seconds and microseconds.
struct timeval {
long tv_sec; /* seconds */
long tv_usec; /* microseconds */
};
If anyone knows an even more accurate timer, let us know.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement