I want to get the start and end time of a for
. Ex.:
#include <stdio.h>
#include <time.h>
int main ()
{
time_t rawtime;
struct tm * timeinfo;
int i, j;
time ( &rawtime );
timeinfo = localtime ( &rawtime );
printf ( "Current local time and date: %s", asctime (timeinfo) );
for (j = 0; j < 10; j ++)
for (i = 0; i < 138763431; i ++);
printf ( "\nCurrent local time and date: %s", asctime (timeinfo) );
return 0;
}
I'm already using GetTickCount()
for seconds. I would give it to manipulate but the way I already tried using time.h
the time is fixed when I call anywhere in my main
.