Sure, a 5 minute rounding could be used, but that assumes the RTC and
system clock are kept in sync (not an unreasonable assumption). But
there remains the problem of having to do the measurement when the
system is slowed down pending suspend confirmation from the
kernel. This can take a while (IIRC, I've measured up to 10-15
seconds).
It's not fun waiting a long time for your system to suspend. You don't
want to bump your laptop while the drive is still spinning, so you
wait for it to finish suspending.
No, the measurement cannot be done after the kernel receives the
suspend "request", because by then the system might not be
behaving. That's why doing the measurement at settimeofday() is a
better solution. And Stephen may have an even better solution (I don't
recall what he came up with).
Regards,
Richard....
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/