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:
Christian Hergert
2016-04-14 05:39:49 -07:00
parent a7982ad1e8
commit 89e75fae2d

View File

@ -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;