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 ?
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 ?
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.
The best way to do precise time measuring is to use a platform independent library component like ACE_High_Res_Timer.