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:
Christian Hergert
2019-07-18 10:22:46 -07:00
parent 991e03ba67
commit c2728b8ada
9 changed files with 42 additions and 53 deletions

View File

@ -33,8 +33,6 @@
#include "sysprof-details-page.h"
#include "sysprof-ui-private.h"
#define NSEC_PER_SEC (G_USEC_PER_SEC * 1000L)
struct _SysprofDetailsPage
{
SysprofPage parent_instance;
@ -231,7 +229,7 @@ sysprof_details_page_set_reader (SysprofDetailsPage *self,
duration = sysprof_capture_reader_get_end_time (reader) -
sysprof_capture_reader_get_start_time (reader);
duration_str = g_strdup_printf (_("%0.4lf seconds"), duration / (gdouble)NSEC_PER_SEC);
duration_str = g_strdup_printf (_("%0.4lf seconds"), duration / (gdouble)SYSPROF_NSEC_PER_SEC);
gtk_label_set_label (self->duration, duration_str);
if (sysprof_capture_reader_get_stat (reader, &st_buf))