Getting time in linux with pure C
Hello,
How do I get miliseconds in a Linux OS using only C.
I want a program to block 0.5 sec then it will listen for an user input.
Thanks
just delete the other post (using the ''did you double post'' checkbox) and the thread will disappear
1) ANSI clock(): CPU time used so far (divide by frequency = CLOCKS_PER_SEC)
2) POSIX.1 sleep(): blocks the program x seconds
3) BSD gettimeofday: second/microsecond timer
4) SDL SDL_GetTicks: millisecond counter
HTH
Jan
2) POSIX.1 sleep(): blocks the program x seconds
3) BSD gettimeofday: second/microsecond timer
4) SDL SDL_GetTicks: millisecond counter
HTH
Jan
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement