* [dpdk-dev] Question about specifying constant time interval when using rte_get_timer_cycles().
@ 2015-10-05 10:59 최익성
2015-10-05 13:10 ` Bruce Richardson
0 siblings, 1 reply; 2+ messages in thread
From: 최익성 @ 2015-10-05 10:59 UTC (permalink / raw)
To: dev
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset=UTF-8, Size: 716 bytes --]
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.
\x16º&«/w^yË&¶«{^Ê&2ÎrÞuß]ùÛm5å\x17º¹ÏjØcjËâ×rɦ*â×¥ryÇ¢½ç_®¦5{^Ê&\x06´Ö)ízW(_vçvóÆòvd¢¸\x0f¢Ë_\x1c"¶\x11\x1213âw@\b\x1e@óèׯvd¢¸\f¢~NrÝ´×w×~uûM´Ð!\x12M\x17z+Þuúèì\x06´ÓXß{^Ê&×NöÓÝ|o'æ²h\x1a×M_)ízW(\bDLý99ËvÓ^tã]ùÓNôÑq1´º(§]W"º'>í\x01Q
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [dpdk-dev] Question about specifying constant time interval when using rte_get_timer_cycles().
2015-10-05 10:59 [dpdk-dev] Question about specifying constant time interval when using rte_get_timer_cycles() 최익성
@ 2015-10-05 13:10 ` Bruce Richardson
0 siblings, 0 replies; 2+ messages in thread
From: Bruce Richardson @ 2015-10-05 13:10 UTC (permalink / raw)
To: 최익성; +Cc: dev
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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-10-05 13:10 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-10-05 10:59 [dpdk-dev] Question about specifying constant time interval when using rte_get_timer_cycles() 최익성
2015-10-05 13:10 ` Bruce Richardson
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).