Use and propagate microsecond-precision timestamps to FormatTime

This enables sub-second precision timestamp formatting for logs and
clients without server-time.
This commit is contained in:
Vladimir Panteleev
2017-10-24 21:45:44 +00:00
parent 901a21e91b
commit 03c4c0b165
6 changed files with 21 additions and 10 deletions
+2 -2
View File
@@ -58,8 +58,8 @@ class CAwayJob : public CTimer {
class CAway : public CModule {
void AwayCommand(const CString& sCommand) {
CString sReason;
time_t curtime;
time(&curtime);
timeval curtime;
gettimeofday(&curtime, nullptr);
if (sCommand.Token(1) != "-quiet") {
sReason = CUtils::FormatTime(curtime, sCommand.Token(1, true),