Add timestamped "starting" message

This commit is contained in:
Ludovic Pouzenc 2018-07-18 11:05:54 +02:00 committed by Matthieu Herrb
parent 0f96d32d4c
commit 16d5383fb8

View file

@ -185,6 +185,9 @@ main(int argc, char *argv[])
err(2, "setitimer"); err(2, "setitimer");
gettimeofday(&last_ts, NULL); gettimeofday(&last_ts, NULL);
tm = localtime((time_t *)&last_ts.tv_sec);
strftime(date, sizeof(date), "%F %T", tm);
printf("%s.%06ld: starting\n", date, last_ts.tv_usec);
while (1) { while (1) {
/* poll() loop to handle interruptions by SIGALRM */ /* poll() loop to handle interruptions by SIGALRM */