- file_name, tartime (t)));
- else if (start_time < t && (now = time (0)) < t)
- WARN ((0, 0, _("%s: time stamp %s is %lu s in the future"),
- file_name, tartime (t), (unsigned long) (t - now)));
+ file_name, tartime (t, true)));
+ else if (timespec_lt (start_time, t))
+ {
+ struct timespec now;
+ gettime (&now);
+ if (timespec_lt (now, t))
+ {
+ unsigned long int ds = t.tv_sec - now.tv_sec;
+ int dns = t.tv_nsec - now.tv_nsec;
+ char dnsbuf[sizeof ".FFFFFFFFF"];
+ if (dns < 0)
+ {
+ dns += 1000000000;
+ ds--;
+ }
+ code_ns_fraction (dns, dnsbuf);
+ WARN ((0, 0, _("%s: time stamp %s is %lu%s s in the future"),
+ file_name, tartime (t, true), ds, dnsbuf));
+ }
+ }