lkml.org 
[lkml]   [2006]   [Mar]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: uptime increases during suspend
Date
"Also sprach Eric Piel:"
> monotonic clock. Linux has such thing since few releases. Using
> CLOCK_MONOTONIC (cf "man 3 clock_gettime") may look much less hacky than
> using the uptime ;-)

Actually, the man page does not say anything about the behavior across
suspends, and ...

CLOCK_REALTIME
System-wide realtime clock. Setting this clock requires appro-
priate privileges.

CLOCK_MONOTONIC
Clock that cannot be set and represents monotonic time since
some unspecified starting point.

I'd understand both those wordings the same way! Well, I suppose
"cannot be set" means that at least humans can't willingly interfere with
it, but maybe something else can.

> Now... concerning the suspend effect on this clock, I don't know. It's
> probably the same problem as uptime: no official semantic has ever been
> stated yet... Does anyone know?

"Monotonic" means "always goes in the same direction", not "never
skips".

Peter
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2006-03-28 06:01    [W:0.086 / U:0.744 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site