Checking Process duration with C
I am checking process duration with C code. It works in Windows 32 bits
environment, but not in Linux 64bits.
At least my process takes longer than 3 minutes, but it shows 0.062 sec.
My code is below.
#include <stdio.h>
#include <time.h>
#include <Windows.h>
int main(void)
{
clock_t start = clock();
//....... doing something. Sorry:D
printf("%.3f sec\n", (double)(clock() - start) / CLOCKS_PER_SEC);
return 0;
}
How to fixed this code to work in 64bits Linux also? Thanks.
No comments:
Post a Comment