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:
@ -67,6 +67,8 @@ typedef gint SysprofClock;
|
||||
typedef gint64 SysprofTimeStamp;
|
||||
typedef gint32 SysprofTimeSysprofan;
|
||||
|
||||
#define SYSPROF_NSEC_PER_SEC G_GINT64_CONSTANT(1000000000)
|
||||
|
||||
SYSPROF_AVAILABLE_IN_ALL
|
||||
SysprofClock sysprof_clock;
|
||||
|
||||
@ -80,7 +82,7 @@ sysprof_clock_get_current_time (void)
|
||||
clock = CLOCK_MONOTONIC;
|
||||
clock_gettime (clock, &ts);
|
||||
|
||||
return (ts.tv_sec * G_GINT64_CONSTANT (1000000000)) + ts.tv_nsec;
|
||||
return (ts.tv_sec * SYSPROF_NSEC_PER_SEC) + ts.tv_nsec;
|
||||
}
|
||||
|
||||
static inline SysprofTimeSysprofan
|
||||
|
||||
Reference in New Issue
Block a user