Messages in this thread | | | From | "Peter T. Breuer" <> | Subject | Re: uptime increases during suspend | Date | Tue, 28 Mar 2006 05:57:11 +0200 (MET DST) |
| |
"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/
| |