mirror of
https://github.com/varun-r-mallya/sysprof.git
synced 2026-02-10 07:00:53 +00:00
libsysprof-capture: fallback to g_time_val_to_iso8601()
To allow us to backport to older systems, we can have a fallback here for the time being.
This commit is contained in:
@ -488,7 +488,17 @@ sysprof_capture_writer_new_from_fd (int fd,
|
|||||||
self->next_counter_id = 1;
|
self->next_counter_id = 1;
|
||||||
|
|
||||||
now = g_date_time_new_now_local ();
|
now = g_date_time_new_now_local ();
|
||||||
|
|
||||||
|
#if GLIB_CHECK_VERSION(2, 62, 0)
|
||||||
nowstr = g_date_time_format_iso8601 (now);
|
nowstr = g_date_time_format_iso8601 (now);
|
||||||
|
#else
|
||||||
|
{
|
||||||
|
GTimeVal tv;
|
||||||
|
|
||||||
|
g_date_time_to_timeval (now, &tv);
|
||||||
|
nowstr = g_time_val_to_iso8601 (&tv);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
header = sysprof_capture_writer_allocate (self, &header_len);
|
header = sysprof_capture_writer_allocate (self, &header_len);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user