qa: fix test newlib/040-gettimeofday.c

This commit is contained in:
Giacomo Tesio 2017-08-25 23:33:10 +02:00
parent bd149a18f1
commit 44fa703f84
1 changed files with 3 additions and 3 deletions

View File

@ -7,15 +7,15 @@ int main (int argc, char** argv) {
gettimeofday (&tvalBefore, NULL);
int i =0;
while (i < 10000)
while (i < 100000000)
i++;
gettimeofday (&tvalAfter, NULL);
// Changed format to long int (%ld), changed time calculation
delta = ((tvalAfter.tv_sec - tvalBefore.tv_sec)*1000000L
+tvalAfter.tv_usec) - tvalBefore.tv_usec;
delta = (tvalAfter.tv_sec - tvalBefore.tv_sec)*1000000L
+(tvalAfter.tv_usec - tvalBefore.tv_usec);
printf("Time in microseconds: %ld microseconds\n", delta);
if(delta > 0)