Contact: aviboots(AT)netvision.net.il
40,764 questions
53,140 answers
573 users
#include <stdio.h> #include <time.h> int main(void) { time_t seconds; seconds = time(NULL); printf("Time since epoch: %ld hours", seconds/3600); } /* run: Time since epoch: 465567 hours */
#include <stdio.h> #include <time.h> int main(void) { struct timespec ts; timespec_get(&ts, TIME_UTC); printf("Time since epoch: %ld hours", ts.tv_sec/3600); } /* run: Time since epoch: 465567 hours */