aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/afb-trace.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/afb-trace.c b/src/afb-trace.c
index f5f9c19e..5404a5af 100644
--- a/src/afb-trace.c
+++ b/src/afb-trace.c
@@ -168,7 +168,7 @@ static struct json_object *timestamp(const struct afb_hookid *hookid)
{
char ts[50];
- snprintf(ts, sizeof ts, "%llu.%09llu", (long long unsigned)hookid->time.tv_sec, (long long unsigned)hookid->time.tv_nsec);
+ snprintf(ts, sizeof ts, "%llu.%06lu", (long long unsigned)hookid->time.tv_sec, (long unsigned)(hookid->time.tv_nsec / 1000));
return json_object_new_string(ts);
}