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] Make getrusage04 be able to loop more times
Date: Mon, 12 Jun 2017 17:04:23 +0200	[thread overview]
Message-ID: <20170612150423.GA32564@rei.lan> (raw)
In-Reply-To: <2050137840.17454791.1496994121958.JavaMail.zimbra@redhat.com>

Hi!
> Do we have? I think we need something like below, not clear
> about if this can be done with function or macro ;).
> 
> timval_minus(tv1, tv2) 
> and
> timeval_gt
> timeval_lt
> timeval_e

We only need to add tst_timeval_diff_us() into tst_timer.h then we can
compare the resulting values in microsenconds. Which would mean adding
tst_timeval_to_us() and tst_timeval_diff(), then adding the
tst_timeval_diff_us() that combines these two.

It should be staturated difference though, i.e. the conversion from
timeval to microseconds should return LONG_LONG_MAX in a case that the
end result would overflow long long.

As I said I can add these into the tst_timer.h, and also fix the
timespec to us and ms conversions to be saturated.

-- 
Cyril Hrubis
chrubis@suse.cz

  reply	other threads:[~2017-06-12 15:04 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-02  7:28 [LTP] [PATCH] Make getrusage04 be able to loop more times Chunyu Hu
2017-06-07 15:13 ` Cyril Hrubis
2017-06-09  7:42   ` Chunyu Hu
2017-06-12 15:04     ` Cyril Hrubis [this message]
2017-06-13 11:47       ` Chunyu Hu
2017-06-13 12:58         ` Cyril Hrubis

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=20170612150423.GA32564@rei.lan \
    --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