[LTP] [PATCH v3 3/4] tst_timer: Create interface for using multiple timers
Cyril Hrubis
chrubis@suse.cz
Thu Aug 16 14:27:28 CEST 2018
Hi!
> > +/**
> > + * Encapsulates a stopwatch timer.
> > + *
> > + * Useful when you need to use multiple timers in a single test.
> > + */
> > +struct tst_timer {
> > + /** The POSIX clock type */
> > + clockid_t clock_id;
> > + /** How much time can pass before tst_timer_expired_st() returns true */
> > + struct timespec limit;
> > + /** Where to start measuring time from */
> > + struct timespec start_time;
> > +};
On a related note, do you really think that we will need nsec resoltion
for the timeout timers? I would say that keeping the limit as unsigned
integer holding number of seconds would be more than enough.
--
Cyril Hrubis
chrubis@suse.cz
More information about the ltp
mailing list