mirror of
https://github.com/varun-r-mallya/sysprof.git
synced 2025-12-31 20:36:25 +00:00
capture: use SpClock for current timestamp
It is important that our capture current time matches the same clock we are using for events. Otherwise we could have drift between CLOCK_MONOTONIC and CLOCK_MONOTONIC_RAW.
This commit is contained in:
@ -25,6 +25,8 @@
|
||||
# include <glib-object.h>
|
||||
#endif
|
||||
|
||||
#include "sp-clock.h"
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
#define SP_CAPTURE_MAGIC (GUINT32_TO_LE(0xFDCA975E))
|
||||
@ -38,7 +40,7 @@ G_BEGIN_DECLS
|
||||
# define SP_CAPTURE_ADDRESS_FORMAT "0x%016llx"
|
||||
#endif
|
||||
|
||||
#define SP_CAPTURE_CURRENT_TIME (g_get_monotonic_time() * 1000L)
|
||||
#define SP_CAPTURE_CURRENT_TIME (sp_clock_get_current_time())
|
||||
#define SP_CAPTURE_COUNTER_INT64 0
|
||||
#define SP_CAPTURE_COUNTER_DOUBLE 1
|
||||
|
||||
|
||||
Reference in New Issue
Block a user