Bug 136625 - Detect hibernation of computer and act accordingly
Summary: Detect hibernation of computer and act accordingly
Status: RESOLVED FIXED
Alias: None
Product: rsibreak
Classification: Unclassified
Component: general (show other bugs)
Version: unspecified
Platform: unspecified Linux
: NOR wishlist with 20 votes (vote)
Target Milestone: ---
Assignee: Tom Albers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-11-01 12:59 UTC by Daniel Hahler
Modified: 2008-10-25 02:00 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Daniel Hahler 2006-11-01 12:59:02 UTC
Version:           0.7.1 (using KDE 3.5.5, Kubuntu (edgy) 4:3.5.5-0ubuntu3)
Compiler:          Target: i486-linux-gnu
OS:                Linux (i686) release 2.6.17-10-generic

If the computer has been hibernated (to disk) or suspended (to ram), it should reset the timer(s).

E.g. "Tiny Breaks" is every 15 minutes. If the computer gets suspended for 1 hour, the first tiny break should happen 15 minutes after resuming.
The same applies for "Big Breaks". If the computer has been hibernated for 8 hours, it should reset both the tiny and big break timers - if they are longer than that.
Comment 1 Tom Albers 2006-11-01 13:18:25 UTC
How should I figure out that you suspended/hibernated your computer?
Comment 2 Daniel Hahler 2006-11-01 15:02:42 UTC
If the last absolute time is "far smaller" than the current one.

E.g., normally the time bumps by 1sec everytime RSIBreak checks it, but then it would be e.g. 7260 (two hours and 1 minute).
Comment 3 Tom Albers 2008-10-25 02:00:41 UTC
SVN commit 875635 by toma:

Add detection of sudden jumps in time and reset the timers in that case. Can be replaced if HAL decides to emit a signal..
I would appreciate feedback if this actually works for you.
BUG: 136625


 M  +16 -0     rsitimer.cpp  
 M  +1 -0      rsitimer.h  


WebSVN link: http://websvn.kde.org/?view=rev&revision=875635