Re: uptime increases during suspend
From: Peter T. Breuer
Date: Mon Mar 27 2006 - 22:56:00 EST
"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@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/