criu/test/test-vdso.c
Cyrill Gorcunov f6ae59cdde test: Add trivial vDSO test
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2011-11-29 16:37:43 +04:00

25 lines
381 B
C

#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <sys/time.h>
#include <sys/types.h>
int main(int argc, char *argv[])
{
int counter = 0;
struct timeval tv;
struct timezone tz;
printf("%s pid %d\n", argv[0], getpid());
while (1) {
gettimeofday(&tv, &tz);
printf("Pid: %10d time: %10li\n",
getpid(), tv.tv_sec);
sleep(3);
}
return 0;
}