Quoting Antonio Argenziano (2018-01-26 16:50:15)
> 
> 
> On 25/01/18 13:28, Chris Wilson wrote:
> > Use the timer routines for computing elapsed time from igt_core for
> > smaller code.
> > 
> > Signed-off-by: Chris Wilson <ch...@chris-wilson.co.uk>
> > ---
> >   lib/igt_aux.h | 25 +++++++++++--------------
> >   1 file changed, 11 insertions(+), 14 deletions(-)
> > 
> > diff --git a/lib/igt_aux.h b/lib/igt_aux.h
> > index 02e70126c..48ba7970f 100644
> > --- a/lib/igt_aux.h
> > +++ b/lib/igt_aux.h
> > @@ -29,6 +29,7 @@
> >   #define IGT_AUX_H
> >   
> >   #include <intel_bufmgr.h>
> > +#include <inttypes.h>
> >   #include <stdbool.h>
> >   #include <stddef.h>
> >   #include <sys/time.h>
> > @@ -251,28 +252,24 @@ void igt_unlock_mem(void);
> >    * True of COND evaluated to true, false otherwise.
> >    */
> >   #define igt_wait(COND, timeout_ms, interval_ms) ({                  \
> > -     struct timeval start_, end_, diff_;                             \
> > -     int elapsed_ms_;                                                \
> > -     bool ret_ = false;                                              \
> > +     struct timespec tv = {};                                        \
> > +     bool ret_;                                                      \
> >                                                                       \
> > -     igt_assert(gettimeofday(&start_, NULL) == 0);                   \
> >       do {                                                            \
> > +             uint64_t elapsed = igt_nsec_elapsed(&tv) >> 20;         \
> 
> Maybe tv_ and elapsed_ just for consistency.
> 
> Reviewed-by: Antonio Argenziano <antonio.argenzi...@intel.com>

Corrected and pushed, thanks!
-Chris
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

Reply via email to