Add timestamped "starting" message
This commit is contained in:
parent
0f96d32d4c
commit
16d5383fb8
1 changed files with 3 additions and 0 deletions
3
echoc.c
3
echoc.c
|
@ -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 */
|
||||||
|
|
Loading…
Add table
Reference in a new issue