|
From: | martin rudalics |
Subject: | Re: desktop.el: autosave? |
Date: | Thu, 06 Dec 2007 00:09:24 +0100 |
User-agent: | Mozilla Thunderbird 1.0 (Windows/20041206) |
Wouldn't it be sufficient to have one idle timer which triggers auto-saving only if some timeout has elapsed since the last auto-save of the desktop?It seems this is not possible with idle timers because they use timeout elapsed since the last user input, not the last time they run.
Ahh no. I meant using an extra variable which records the last autosave date. Whenever the routine triggered by the idle timer detects that the period (one hour ...) has elapsed (by comparing that variable's value with the present time) it does autosave and reset that variable. This would only fail when an idle time starts before the autosave timeout has expired and terminates long after that.
[Prev in Thread] | Current Thread | [Next in Thread] |