Reputation: 50278
On linux we can use "time" command. Or from C++:
#include <sys/time.h>
#include <sys/resource.h>
int getrusage(int who, struct rusage *usage);
How to do a closest thing to that on windows ?
Upvotes: 2
Views: 1278
Reputation: 20219
The best way to do precise time measuring is to use a platform independent library component like ACE_High_Res_Timer.
Upvotes: 1
Reputation: 35450
This gives lpUserTime [out] : A pointer to a FILETIME structure that receives the amount of time that the process has executed in user mode. The time that each of the threads of the process has executed in user mode is determined, and then all of those times are summed together to obtain this value.
Upvotes: 3