mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2025-01-11 21:20:09 +00:00
gsk: Add some more profiler apis
Add a way to extract the start time of timers. This will let us reuse the profiler timers for tracing.
This commit is contained in:
parent
1660bac6bd
commit
c541fa9555
@ -365,6 +365,19 @@ gsk_profiler_timer_get (GskProfiler *profiler,
|
|||||||
return timer->value;
|
return timer->value;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
gint64
|
||||||
|
gsk_profiler_timer_get_start (GskProfiler *profiler,
|
||||||
|
GQuark timer_id)
|
||||||
|
{
|
||||||
|
NamedTimer *timer;
|
||||||
|
|
||||||
|
timer = gsk_profiler_get_timer (profiler, timer_id);
|
||||||
|
if (timer == NULL)
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
return timer->start_time;
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
gsk_profiler_reset (GskProfiler *profiler)
|
gsk_profiler_reset (GskProfiler *profiler)
|
||||||
{
|
{
|
||||||
|
@ -40,6 +40,8 @@ gint64 gsk_profiler_counter_get (GskProfiler *profiler,
|
|||||||
GQuark counter_id);
|
GQuark counter_id);
|
||||||
gint64 gsk_profiler_timer_get (GskProfiler *profiler,
|
gint64 gsk_profiler_timer_get (GskProfiler *profiler,
|
||||||
GQuark timer_id);
|
GQuark timer_id);
|
||||||
|
gint64 gsk_profiler_timer_get_start (GskProfiler *profiler,
|
||||||
|
GQuark timer_id);
|
||||||
|
|
||||||
void gsk_profiler_reset (GskProfiler *profiler);
|
void gsk_profiler_reset (GskProfiler *profiler);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user