qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 2/4] qtest: replace gettimeofday with GTimer


From: Marc-André Lureau
Subject: Re: [PATCH 2/4] qtest: replace gettimeofday with GTimer
Date: Sat, 5 Mar 2022 01:12:28 +0400

Hi Richard

On Sat, Mar 5, 2022 at 12:50 AM Richard Henderson
<richard.henderson@linaro.org> wrote:
>
> On 3/4/22 05:27, marcandre.lureau@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

[Prev in Thread] Current Thread [Next in Thread]