397c397
<     static int firstsec;
---
>     static struct timeval first_time = { 0, 0 };
428,429c428,438
<     if(!firstsec) {
<         firstsec = now.tv_sec;
---
>     if (!first_time.tv_sec) {
>         first_time = now;
>     }
>     if (now.tv_usec < first_time.tv_usec) {
>         /* carry */
>         now.tv_sec -= first_time.tv_sec + 1;
>         now.tv_usec += 1000000 - first_time.tv_usec;
>     } else {
>         /* no carry */
>         now.tv_sec -= first_time.tv_sec;
>         now.tv_usec -= first_time.tv_usec;
431d439
<     now.tv_sec -= firstsec;
434c442
<                    (int)now.tv_sec, (int)now.tv_usec, contexttext);
---
>                    (int) now.tv_sec, (int) now.tv_usec, contexttext);
