mirror of
https://github.com/varun-r-mallya/sysprof.git
synced 2026-02-10 07:00:53 +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_stopping == FALSE);
|
||||||
g_return_if_fail (priv->is_starting == 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)
|
if (priv->writer == NULL)
|
||||||
{
|
{
|
||||||
SpCaptureWriter *writer;
|
SpCaptureWriter *writer;
|
||||||
|
|||||||
Reference in New Issue
Block a user