// POSIX (Linux, macOS, Unix)
#include <stdio.h>
#include <time.h>
#include <unistd.h>
int main() {
time_t t = time(NULL);
printf("%s", ctime(&t));
sleep(5);
t = time(NULL);
printf("%s", ctime(&t));
return 0;
}
/*
run:
Mon May 30 05:42:09 2022
Mon May 30 05:42:14 2022
*/