diff options
author | Matthias Vogelgesang <matthias.vogelgesang@kit.edu> | 2014-08-21 08:31:26 +0200 |
---|---|---|
committer | Matthias Vogelgesang <matthias.vogelgesang@kit.edu> | 2014-08-21 08:53:47 +0200 |
commit | 404ac95a4be625bf8759d3191c99df17ed0fc924 (patch) | |
tree | d1567e2dac0647205e159051d04c43c8a1555ac5 /ufo/ufo-priv.c | |
parent | 8be1c34ba98672fde543835669ed87590e26f4b2 (diff) |
Fix #28: use elapsed seconds to compute timestamp
Diffstat (limited to 'ufo/ufo-priv.c')
-rw-r--r-- | ufo/ufo-priv.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/ufo/ufo-priv.c b/ufo/ufo-priv.c index dea64c0..a52e387 100644 --- a/ufo/ufo-priv.c +++ b/ufo/ufo-priv.c @@ -117,8 +117,9 @@ write_trace_json (const gchar *filename_template, GList *events) g_list_for (events, it) { Event *event = (Event *) it->data; - fprintf (fp, "{\"cat\":\"f\",\"ph\": \"%c\", \"ts\": %.1f, \"pid\": %zu, \"tid\": \"%s\",\"name\": \"%s\", \"args\": {}}", - event->type, event->timestamp, event->pid, event->tid, event->name); + gdouble timestamp = event->timestamp * 1000 * 1000; + fprintf (fp, "{\"cat\":\"f\",\"ph\": \"%c\", \"ts\": %.0f, \"pid\": %zu, \"tid\": \"%s\",\"name\": \"%s\", \"args\": {}}", + event->type, timestamp, event->pid, event->tid, event->name); if (g_list_next (it) != NULL) fprintf (fp, ","); |