You are not logged in.
Pages: 1
I am writting in c++ and i want to know how much time has elapsed while executing some part of code. In windows I would use GetTickCount() like this:
time=GetTickCount();
//some code
time=GetTickCount()-time;
printf("Time elapsed: %d",time);
What function can I use in linux? The function doesn't have to be portable but it must have at least millisecond resolution.
Offline
take a look at 'man clock_gettime' and 'man gettimeofday'
Offline
thx! even better than I needed .
Offline
Pages: 1