Skip to main content
GameDev.net gamedev.net
🔒 Locked

tracking user time

Started by BTownTKD Apr 13, 2006 at 12:28 PM 0 replies 350+ views
Original Post
BTownTKD
BTownTKD
Hey all; I am writing a program in which I need to track the "user" time. At first, we were going to use getrusage(), but we can't get it to work in visual studio (apparently it's not in any available libraries -- only for linux?). What other ways are there to track "user" time that are compatible with both windows visual studio and linux g++? Would the clock() function in do this, or would it track "real-world" time only? How would I use clock() to track the # of milliseconds that the program has been running? Thanks for the help, fellas.
Deep Blue Wave - Brian's Dev Blog.
Extrarius
Extrarius
To track the amount of user time and/or kernel time a process uses in windows, use the function GetProcessTimes
"Walk not the trodden path, for it has borne it's burden." -John, Flying Monk

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.