mirror of
https://github.com/varun-r-mallya/sysprof.git
synced 2025-12-31 20:36:25 +00:00
cleanup: remove duplicated NSEC_PER_SEC macros
This switches everything to using a single 64-bit constant for NSEC_PER_SEC that ensure we're doing 64-bit math everywhere.
This commit is contained in:
@ -28,8 +28,6 @@
|
||||
|
||||
#include "sysprof-log-model.h"
|
||||
|
||||
#define NSEC_PER_SEC (G_USEC_PER_SEC * 1000L)
|
||||
|
||||
struct _SysprofLogModel
|
||||
{
|
||||
GObject parent_instance;
|
||||
@ -189,9 +187,9 @@ sysprof_log_model_get_value (GtkTreeModel *model,
|
||||
case SYSPROF_LOG_MODEL_COLUMN_TIME_STRING:
|
||||
{
|
||||
gint64 offset = item->time - self->begin_time;
|
||||
gint min = offset / (NSEC_PER_SEC * 60L);
|
||||
gint seconds = (offset - (min * NSEC_PER_SEC)) / NSEC_PER_SEC;
|
||||
gint msec = (offset % NSEC_PER_SEC) / (NSEC_PER_SEC / 1000L);
|
||||
gint min = offset / SYSPROF_NSEC_PER_SEC / 60L;
|
||||
gint seconds = (offset - (min * SYSPROF_NSEC_PER_SEC)) / SYSPROF_NSEC_PER_SEC;
|
||||
gint msec = (offset % SYSPROF_NSEC_PER_SEC) / (SYSPROF_NSEC_PER_SEC / 1000L);
|
||||
|
||||
g_value_init (value, G_TYPE_STRING);
|
||||
g_value_take_string (value,
|
||||
|
||||
Reference in New Issue
Block a user