[sysprof] libsysprof-capture: use GDateTime instead of GTimeVal



commit 0716e23fb4fab9784ec4920bff4a21ec90a1a6f3
Author: Christian Hergert <chergert redhat com>
Date:   Thu Aug 8 16:08:00 2019 -0700

    libsysprof-capture: use GDateTime instead of GTimeVal

 src/libsysprof-capture/sysprof-capture-writer.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/src/libsysprof-capture/sysprof-capture-writer.c b/src/libsysprof-capture/sysprof-capture-writer.c
index 351301c..6c9362e 100644
--- a/src/libsysprof-capture/sysprof-capture-writer.c
+++ b/src/libsysprof-capture/sysprof-capture-writer.c
@@ -462,9 +462,9 @@ sysprof_capture_writer_new_from_fd (int   fd,
                                     gsize buffer_size)
 {
   g_autofree gchar *nowstr = NULL;
+  g_autoptr(GDateTime) now = NULL;
   SysprofCaptureWriter *self;
   SysprofCaptureFileHeader *header;
-  GTimeVal tv;
   gsize header_len = sizeof(*header);
 
   if (fd < 0)
@@ -486,8 +486,8 @@ sysprof_capture_writer_new_from_fd (int   fd,
   self->len = buffer_size;
   self->next_counter_id = 1;
 
-  g_get_current_time (&tv);
-  nowstr = g_time_val_to_iso8601 (&tv);
+  now = g_date_time_new_now_local ();
+  nowstr = g_date_time_format_iso8601 (now);
 
   header = sysprof_capture_writer_allocate (self, &header_len);
 


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