Hi I hava a little problem because the function time() keeps returning -1 is there any posible way to fix this?
I tried:
time_t start, end; start = time(NULL); //do something end = time(NULL); But when I debug both have the value -1. and I tried:
time_t start, end; time(&start); // do something time(&end); But in this case both values stay 0.
if (difftime(mod_end, mod_start) < TCK_WAIT_TIME_SEC)but I check the values in the debugerstart = time(NULL); if (start==(time_t)-1) perror("time failed"); else printf("start=%ld\n",start);