/* time_t.c - display the current time in Epoch seconds * Andrew Ho (andrew@zeuscat.com) * * Build: gcc -o time_t time_t.c * Usage: time_t */ #include #include int main(int argc, char **argv) { time_t now = time(NULL); if(now > 0) { printf("%ld\n", now); return 0; } else { perror("could not call time()"); return now; } }