#include <sys/time.h>
#include <stdio.h>
#include <errno.h>
int main(int argc, char *argv[])
{
struct timeval now;
struct timeval was;
int rc;
rc = gettimeofday(&was, NULL);
if (rc != 0) {
printf("gettimeofday() failed, errno = %d\n", errno);
return (-1);
}
now.tv_sec = -11111111111111;
now.tv_usec = 290944;
rc = settimeofday(&now, NULL);
if (rc == 0)
printf("settimeofday() successful.\n");
else {
printf("settimeofday() failed, errno = %d\n", errno);
return (-1);
}
rc = settimeofday(&was, NULL);
return (0);
}