4
I want to take the time of beginning and end 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 the GetTickCount()
for seconds. I could manipulate but the way I’ve tried using the time.h
the time is fixed when I call anywhere in my main
.
I don’t understand why you don’t
GetTickCount
.– Guill
Put what you did and what went wrong.
– Maniero
because I have to show the start time and the end time. I will use Gettickcount to show the seconds between that time.
– JBarbosa
@edited mustache...
– JBarbosa