DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] Recommended method of getting timestamps?
@ 2013-09-05 18:01 Patrick Mahan
  2013-09-05 18:09 ` Daniel Cegiełka
  2013-09-06  6:33 ` Dmitry Vyal
  0 siblings, 2 replies; 4+ messages in thread
From: Patrick Mahan @ 2013-09-05 18:01 UTC (permalink / raw)
  To: dev

I have a need to keep a timestamp on a piece of global data.  When then timestamp grows too old I want to refresh that data.  Is it safe to use, gettimeofday()?

I thought about using an alarm, but I need to set an alarm from inside the alarm callback which doesn't look like it will work due to the spinlock on the alarm list.

And since this is inside the driver I am working on, setting up a timer is not simple.

So, I figure to timestamp the data, wait until I need to access it, check the timestamp and refresh if it is too old.

Thoughts?  Suggestions?

Thanks,

Patrick

Coming to you from deep inside Fortress Mahan

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2013-09-06  6:45 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-09-05 18:01 [dpdk-dev] Recommended method of getting timestamps? Patrick Mahan
2013-09-05 18:09 ` Daniel Cegiełka
2013-09-06  6:33 ` Dmitry Vyal
2013-09-06  6:45   ` Stephen Hemminger

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).