public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
From: Cyril Hrubis <chrubis@suse.cz>
To: ltp@lists.linux.it
Subject: [LTP] [PATCH v3 3/4] tst_timer: Create interface for using multiple timers
Date: Thu, 16 Aug 2018 14:27:28 +0200	[thread overview]
Message-ID: <20180816122728.GE6547@rei> (raw)
In-Reply-To: <20180816122247.GD6547@rei>

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

  reply	other threads:[~2018-08-16 12:27 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-16 12:00 [LTP] [PATCH v3 1/4] lib: Allow user to easily get LTP_TIMEOUT_MUL value Richard Palethorpe
2018-08-16 12:00 ` [LTP] [PATCH v3 2/4] tst_timer: Convert to new library Richard Palethorpe
2018-08-16 12:08   ` Cyril Hrubis
2018-08-16 12:00 ` [LTP] [PATCH v3 3/4] tst_timer: Create interface for using multiple timers Richard Palethorpe
2018-08-16 12:22   ` Cyril Hrubis
2018-08-16 12:27     ` Cyril Hrubis [this message]
2018-08-16 13:06       ` Richard Palethorpe
2018-08-16 12:58     ` Richard Palethorpe
2018-08-16 12:59       ` Cyril Hrubis
2018-08-16 12:00 ` [LTP] [PATCH v3 4/4] fzsync: Limit execution time to prevent test timeouts Richard Palethorpe
2018-08-17  7:43   ` Li Wang
2018-08-17  9:04     ` Li Wang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180816122728.GE6547@rei \
    --to=chrubis@suse.cz \
    --cc=ltp@lists.linux.it \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox