DPDK patches and discussions
 help / color / mirror / Atom feed
* [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É­¦*âž×¥r‰‘yÇ¢½ç_®‰¦­5Š{^•Ê&š\x06´Ö)ízW(›_vçžvóÆòv—d¢¸\x0f¢Ë_‹\x1c"¶\x11\x1213âw@\b\x1e@ó‡è­×¯v—d¢¸\f¢~Nrݴםw×~uûM´Ð!\x12M\x17œz+Þuú蚊ìš\x06´ÓXߊ{^•Ê&×NöÓÝ|o'æ²h\x1a×M_š)ízW(›\b­„DŒLý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).