mirror of
https://github.com/varun-r-mallya/sysprof.git
synced 2025-12-31 20:36:25 +00:00
profiler: reset timer when starting
If we reuse the profiler instance (not convinced this is a good idea yet) then we could have a nonzero elapsed time. Reset it immediately so that the UI doesn't jitter between the previous value and 00:00.
This commit is contained in:
@ -459,6 +459,9 @@ sp_local_profiler_start (SpProfiler *profiler)
|
||||
g_return_if_fail (priv->is_stopping == FALSE);
|
||||
g_return_if_fail (priv->is_starting == FALSE);
|
||||
|
||||
g_clear_pointer (&priv->timer, g_timer_destroy);
|
||||
g_object_notify (G_OBJECT (self), "elapsed");
|
||||
|
||||
if (priv->writer == NULL)
|
||||
{
|
||||
SpCaptureWriter *writer;
|
||||
|
||||
Reference in New Issue
Block a user