From 9248a27415b51ae5674dd79d1738cf8f0549806f Mon Sep 17 00:00:00 2001 From: Jabier Arraiza Date: Sat, 12 Oct 2019 12:37:18 +0000 Subject: Move from deprecated GTimeVal to g_get_monotonic_time() --- src/debug/timestamp.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/debug/timestamp.cpp') diff --git a/src/debug/timestamp.cpp b/src/debug/timestamp.cpp index 14d211ef3..dab4e733a 100644 --- a/src/debug/timestamp.cpp +++ b/src/debug/timestamp.cpp @@ -23,9 +23,8 @@ namespace Inkscape { namespace Debug { std::shared_ptr timestamp() { - GTimeVal timestamp; - g_get_current_time(×tamp); - gchar *value = g_strdup_printf( "%d.%06d", static_cast(timestamp.tv_sec), static_cast(timestamp.tv_usec) ); + gint64 micr = g_get_monotonic_time(); + gchar *value = g_strdup_printf("%.6f", (gdouble)micr / 1000000.0); std::shared_ptr result = std::make_shared(value); g_free(value); return result; -- cgit v1.2.3