[grilo/mocking: 17/27] net: Put the timestamp before the URL in the captured file



commit 4ca94420395cf512b6075ffd8777ffc819f7df91
Author: Mathias Hasselmann <mathias openismus com>
Date:   Thu Oct 18 23:53:37 2012 +0200

    net: Put the timestamp before the URL in the captured file
    
    So it is easier to sort the results in chronological order.
    Also use monotonic instead of real time for exactly the same purpose.

 libs/net/grl-net-private.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/libs/net/grl-net-private.c b/libs/net/grl-net-private.c
index 36865c4..e4287f0 100644
--- a/libs/net/grl-net-private.c
+++ b/libs/net/grl-net-private.c
@@ -111,8 +111,8 @@ static char *
 build_request_filename (const char *uri)
 {
     char *escaped_uri = g_uri_escape_string (uri, NULL, FALSE);
-    char *filename = g_strdup_printf ("%s-%"G_GINT64_FORMAT,
-                                      escaped_uri, g_get_real_time ());
+    char *filename = g_strdup_printf ("%"G_GINT64_FORMAT "-%s",
+                                      g_get_monotonic_time (), escaped_uri);
 
     g_free (escaped_uri);
     return filename;



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]