]> git.sesse.net Git - cubemap/commit
Fix an issue where access.log would have the wrong timestamp.
authorSteinar H. Gunderson <sgunderson@bigfoot.com>
Fri, 1 Apr 2016 23:17:18 +0000 (01:17 +0200)
committerSteinar H. Gunderson <sgunderson@bigfoot.com>
Fri, 1 Apr 2016 23:17:18 +0000 (01:17 +0200)
commitb1b81d8f5492e48a60f0ed2930a098747928e5c4
treee06844948b0e246250cfeea1b420fd7fe9480097
parent8077fd7663c0e79e4d42c9db55be1de02027a17d
Fix an issue where access.log would have the wrong timestamp.

The refactoring to use monotonic timestamps did not take into account
that the timestamps are used for the access log, so it'd contain
(roughly) time since boot instead of the actual time of day. Fixed by
measuring the offset between the two (although if the clock is wrong
at the time of logging, the connection time will be wrong -- as opposed
to if the clock is wrong at the time of connect, hard to say which is
the better). Reported by Joachim Tingvold.

While we are at it, change some of the timespec functions so that we
get slightly more precise timing in the logs (it could be about a second
off). For cosmetics only.
Makefile.in
accesslog.cpp
httpinput.cpp
timespec.cpp [new file with mode: 0644]
timespec.h [new file with mode: 0644]