Hi Richard

On Sat, Mar 5, 2022 at 12:50 AM Richard Henderson
<richard.hender...@linaro.org> wrote:
>
> On 3/4/22 05:27, marcandre.lur...@redhat.com wrote:
> > +        g_clear_pointer(&timer, g_timer_destroy);
> > +        timer = g_timer_new();
>
> Why not g_timer_{reset,start}, instead of destroying and recreating?

Well, that didn't seem much easier, as that opens the question where
to create/destroy. And we would potentially have a "running" timer at
creation time, which could be confusing.

(btw, just found that doc : "This function is useless; it's fine to
call g_timer_start() on an already-started timer to reset the start
time, so g_timer_reset() serves no purpose" ;)

thanks


Reply via email to