libsysprof-analyze: add duration helper

This commit is contained in:
Christian Hergert
2023-06-30 15:02:46 -07:00
parent b9a3591771
commit 9481c8e772

View File

@ -41,6 +41,12 @@ SysprofTimeSpan *sysprof_time_span_copy (const SysprofTimeSpan *self);
SYSPROF_AVAILABLE_IN_ALL
void sysprof_time_span_free (SysprofTimeSpan *self);
static inline gint64
sysprof_time_span_duration (SysprofTimeSpan time_span)
{
return time_span.end_nsec - time_span.begin_nsec;
}
static inline SysprofTimeSpan
sysprof_time_span_relative_to (SysprofTimeSpan time_span,
gint64 point)