From: Bruce Richardson <bruce.richardson@intel.com>
To: 최익성 <pnk003@naver.com>
Cc: dev@dpdk.org
Subject: Re: [dpdk-dev] Question about specifying constant time interval when using rte_get_timer_cycles().
Date: Mon, 5 Oct 2015 14:10:09 +0100 [thread overview]
Message-ID: <20151005131008.GA22612@bricha3-MOBL3> (raw)
In-Reply-To: <a51e66f48be0a2a7bb595085a3cbadb7@cweb29.nm.nhnsystem.com>
On Mon, Oct 05, 2015 at 07:59:27PM +0900, 최익성 wrote:
> Dear DPDK experts.
>
> I have a question about specifying constant time interval when using rte_get_timer_cycles();
>
> Would you let me know how can I specify constant time 30 seconds of DRAIN_TIME?
>
> I will really appreciate if let me know.
>
>
> uint64_t now, old, DRAIN_TIME ;
>
> DRAIN_TIME = ? // 30 seconds.
>
> old = rte_get_timer_cycles();
> ...
> now = rte_get_timer_cycles();
>
> if ((new-old) > DRAIN_TIME ) { ... }
>
>
> Thank you very much.
>
> Sincerely Yours,
>
> Ick-Sung Choi.
>
The companion function rte_get_timer_hz should be what you want I think. It will
allow you to translate cycles to seconds/milliseconds.
/Bruce
prev parent reply other threads:[~2015-10-05 13:10 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-05 10:59 최익성
2015-10-05 13:10 ` Bruce Richardson [this message]
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=20151005131008.GA22612@bricha3-MOBL3 \
--to=bruce.richardson@intel.com \
--cc=dev@dpdk.org \
--cc=pnk003@naver.com \
/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;
as well as URLs for NNTP newsgroup(s).