Reputation: 75
I am trying to use gettimeofday64() instead of gettimeofday() function.
#include <time.h>
#include <stdio.h>
int main () {
struct timeval64 tim;
int ret = gettimeofday64(&tim, NULL);
printf("Ret = %d\n", ret);
return 0;
}
Getting compilation error:
day.cpp: In function ‘int main()’:
day.cpp:5: error: aggregate ‘timeval64 tim’ has incomplete type and cannot be defined
day.cpp:6: error: ‘gettimeofday64’ was not declared in this scope
The same code works when used getimeofday() with header #include <sys/time.h> Why i am getting error for using gettimeofday64()?
Upvotes: 0
Views: 136