lkml.org 
[lkml]   [2014]   [Jun]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [patch 13/13] tomoyo: Use sensible time interface
From
On Wed, Jun 11, 2014 at 4:59 PM, Thomas Gleixner <tglx@linutronix.de> wrote:
> There is no point in calling gettimeofday if only the seconds part of
> the timespec is used. Use get_seconds() instead. It's not only the
> proper interface it's also faster.

My only caution here is you only get tick-granular time here. So if
the second rolled over after the last tick, you'd get the previous
second when you call get_seconds(). This can cause some surprising
effects if the get_seconds() return value is mixed with clocksource
granular gettimeofday() calls.

thanks
-john


\
 
 \ /
  Last update: 2014-06-12 05:01    [W:0.252 / U:0.420 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site