mirror of
https://github.com/clearlinux/graphene.git
synced 2026-09-06 05:41:37 +00:00
17 lines
290 B
C
17 lines
290 B
C
#include <stdio.h>
|
|
#include <sys/time.h>
|
|
|
|
int main(int argc, char** argv) {
|
|
struct timeval time;
|
|
|
|
int ret = gettimeofday(&time, NULL);
|
|
|
|
if (ret < 0) {
|
|
perror("gettimeofday");
|
|
return -1;
|
|
}
|
|
|
|
printf("Current timestamp: %ld\n", time.tv_sec);
|
|
return 0;
|
|
}
|