[sysprof] libsysprof-ui: fix minute value
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [sysprof] libsysprof-ui: fix minute value
- Date: Thu, 27 Feb 2020 05:59:35 +0000 (UTC)
commit 58b9bc9992bc3ab09fe7a123489115ac9e4c3226
Author: Christian Hergert <chergert redhat com>
Date: Wed Feb 26 21:59:03 2020 -0800
libsysprof-ui: fix minute value
src/libsysprof-ui/sysprof-log-model.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/src/libsysprof-ui/sysprof-log-model.c b/src/libsysprof-ui/sysprof-log-model.c
index c7b3183..276ea06 100644
--- a/src/libsysprof-ui/sysprof-log-model.c
+++ b/src/libsysprof-ui/sysprof-log-model.c
@@ -188,7 +188,7 @@ sysprof_log_model_get_value (GtkTreeModel *model,
{
gint64 offset = item->time - self->begin_time;
gint min = offset / SYSPROF_NSEC_PER_SEC / 60L;
- gint seconds = (offset - (min * SYSPROF_NSEC_PER_SEC)) / SYSPROF_NSEC_PER_SEC;
+ gint seconds = ((offset - (min * SYSPROF_NSEC_PER_SEC)) / SYSPROF_NSEC_PER_SEC) % 60;
gint msec = (offset % SYSPROF_NSEC_PER_SEC) / (SYSPROF_NSEC_PER_SEC / 1000L);
g_value_init (value, G_TYPE_STRING);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]