Skip to content

Commit

Permalink
Convert all microseconds to milliseconds
Browse files Browse the repository at this point in the history
  • Loading branch information
pascal-fb-martin committed Nov 26, 2020
1 parent dc967ae commit 225f877
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions houselog.c
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ void houselog_trace (const char *file, int line, const char *level,

if (TraceFile) {
fprintf (TraceFile, "%ld.%03d,\"%s\",\"%s\",%d,\"%s\",\"%s\"\n",
(long) (timestamp.tv_sec), (int)(timestamp.tv_usec / 1000),
(long) (timestamp.tv_sec), (int)(timestamp.tv_usec/1000),
level, file, line, object, text);
fflush (TraceFile);
}
Expand Down Expand Up @@ -350,7 +350,7 @@ static const char *houselog_live (time_t now) {
"%s[%ld%03d,\"%s\",\"%s\",\"%s\",\"%s\"]",
prefix,
(long)(cursor->timestamp.tv_sec),
(int)(cursor->timestamp.tv_usec),
(int)(cursor->timestamp.tv_usec/1000),
cursor->category,
cursor->object,
cursor->action,
Expand Down

0 comments on commit 225f877

Please sign in to comment.