Code

make sure microseconds get the right number of decimal places
authormental <mental@users.sourceforge.net>
Thu, 10 May 2007 01:18:10 +0000 (01:18 +0000)
committermental <mental@users.sourceforge.net>
Thu, 10 May 2007 01:18:10 +0000 (01:18 +0000)
src/debug/timestamp.cpp

index 75447ff359de816f3935a9f97bcc92b8a35a620c..1c626975636ac40be35c5d54e592f0c006056bc7 100644 (file)
@@ -23,7 +23,7 @@ Util::ptr_shared<char> timestamp() {
     Util::ptr_shared<char> result;
     GTimeVal timestamp;
     g_get_current_time(&timestamp);
-    gchar *value = g_strdup_printf("%d.%d", timestamp.tv_sec, timestamp.tv_usec);
+    gchar *value = g_strdup_printf("%d.%06d", timestamp.tv_sec, timestamp.tv_usec);
     result = Util::share_string(value);
     g_free(value);
     return result;