[sysprof] libsysprof-capture: try harder to get proper end-time
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [sysprof] libsysprof-capture: try harder to get proper end-time
- Date: Wed, 29 May 2019 22:25:18 +0000 (UTC)
commit 2498b4cded8b4453d1df7c819e0048c976fa0f2d
Author: Christian Hergert <chergert redhat com>
Date: Mon May 13 14:50:40 2019 -0700
libsysprof-capture: try harder to get proper end-time
src/libsysprof-capture/sysprof-capture-reader.c | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
---
diff --git a/src/libsysprof-capture/sysprof-capture-reader.c b/src/libsysprof-capture/sysprof-capture-reader.c
index 70e1757..b777c1c 100644
--- a/src/libsysprof-capture/sysprof-capture-reader.c
+++ b/src/libsysprof-capture/sysprof-capture-reader.c
@@ -905,16 +905,19 @@ sysprof_capture_reader_get_start_time (SysprofCaptureReader *self)
gint64
sysprof_capture_reader_get_end_time (SysprofCaptureReader *self)
{
+ gint64 end_time = 0;
+
g_return_val_if_fail (self != NULL, 0);
if (self->header.end_time != 0)
{
if (self->endian != G_BYTE_ORDER)
- return GUINT64_SWAP_LE_BE (self->header.end_time);
- return self->header.end_time;
+ end_time = GUINT64_SWAP_LE_BE (self->header.end_time);
+ else
+ end_time = self->header.end_time;
}
- return self->end_time;
+ return MAX (self->end_time, end_time);
}
/**
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]