[dpdk-dev] Recommended method of getting timestamps?

Patrick Mahan mahan at mahan.org
Thu Sep 5 20:01:32 CEST 2013


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


More information about the dev mailing list