summaryrefslogtreecommitdiffstats
path: root/src/debug
diff options
context:
space:
mode:
authorJabier Arraiza <jabier.arraiza@marker.es>2019-10-12 12:37:18 +0000
committerJabier Arraiza <jabier.arraiza@marker.es>2019-10-12 12:37:18 +0000
commit9248a27415b51ae5674dd79d1738cf8f0549806f (patch)
tree7ee74806627058a1cc5c871805ccbb9779990e98 /src/debug
parentFix rendering issue on panning with text tool (diff)
downloadinkscape-9248a27415b51ae5674dd79d1738cf8f0549806f.tar.gz
inkscape-9248a27415b51ae5674dd79d1738cf8f0549806f.zip
Move from deprecated GTimeVal to g_get_monotonic_time()
Diffstat (limited to 'src/debug')
-rw-r--r--src/debug/timestamp.cpp5
1 files changed, 2 insertions, 3 deletions
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<std::string> timestamp() {
- GTimeVal timestamp;
- g_get_current_time(&timestamp);
- gchar *value = g_strdup_printf( "%d.%06d", static_cast<gint>(timestamp.tv_sec), static_cast<gint>(timestamp.tv_usec) );
+ gint64 micr = g_get_monotonic_time();
+ gchar *value = g_strdup_printf("%.6f", (gdouble)micr / 1000000.0);
std::shared_ptr<std::string> result = std::make_shared<std::string>(value);
g_free(value);
return result;