mirror of
https://github.com/varun-r-mallya/sysprof.git
synced 2026-02-10 15:10:53 +00:00
libsysprof-analyze: add equal func for timespan
This commit is contained in:
@ -130,4 +130,17 @@ sysprof_time_span_to_string (const SysprofTimeSpan *span)
|
|||||||
return g_strdup_printf ("%s (%s)", begin, end);
|
return g_strdup_printf ("%s (%s)", begin, end);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static inline gboolean
|
||||||
|
sysprof_time_span_equal (const SysprofTimeSpan *a,
|
||||||
|
const SysprofTimeSpan *b)
|
||||||
|
{
|
||||||
|
if (a == b)
|
||||||
|
return TRUE;
|
||||||
|
|
||||||
|
if (a == NULL || b == NULL)
|
||||||
|
return FALSE;
|
||||||
|
|
||||||
|
return memcmp (a, b, sizeof *a) == 0;
|
||||||
|
}
|
||||||
|
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
|
|||||||
Reference in New Issue
Block a user