From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: ndame Newsgroups: gmane.emacs.bugs Subject: bug#39824: 26.2; timers sometimes stop working when coming back from sleep Date: Fri, 28 Feb 2020 15:52:51 +0000 (GMT) Message-ID: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_17475_292461959.1582905171370" Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="66341"; mail-complaints-to="usenet@ciao.gmane.io" To: 39824@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Feb 28 16:57:13 2020 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1j7i0m-000H8I-82 for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 28 Feb 2020 16:57:12 +0100 Original-Received: from localhost ([::1]:49216 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j7i0l-0007FE-AV for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 28 Feb 2020 10:57:11 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:50371) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j7i0d-0007Ex-DS for bug-gnu-emacs@gnu.org; Fri, 28 Feb 2020 10:57:04 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1j7i0c-00045c-9O for bug-gnu-emacs@gnu.org; Fri, 28 Feb 2020 10:57:03 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:55940) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1j7i0c-00045S-6p for bug-gnu-emacs@gnu.org; Fri, 28 Feb 2020 10:57:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1j7i0c-0000S8-5E for bug-gnu-emacs@gnu.org; Fri, 28 Feb 2020 10:57:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: ndame Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 28 Feb 2020 15:57:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 39824 X-GNU-PR-Package: emacs X-Debbugs-Original-To: "bug-gnu-emacs@gnu.org" Original-Received: via spool by submit@debbugs.gnu.org id=B.15829053811682 (code B ref -1); Fri, 28 Feb 2020 15:57:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 28 Feb 2020 15:56:21 +0000 Original-Received: from localhost ([127.0.0.1]:33680 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1j7hzw-0000R4-MP for submit@debbugs.gnu.org; Fri, 28 Feb 2020 10:56:20 -0500 Original-Received: from lists.gnu.org ([209.51.188.17]:50027) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1j7hzu-0000Qw-Lg for submit@debbugs.gnu.org; Fri, 28 Feb 2020 10:56:19 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:50292) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j7hzt-00075I-Bx for bug-gnu-emacs@gnu.org; Fri, 28 Feb 2020 10:56:18 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1j7hzs-0003fn-7Z for bug-gnu-emacs@gnu.org; Fri, 28 Feb 2020 10:56:17 -0500 Original-Received: from fmfe13.onbox.hu ([46.107.16.206]:41653 helo=web-out.onbox.hu) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1j7hzs-0003YV-0S for bug-gnu-emacs@gnu.org; Fri, 28 Feb 2020 10:56:16 -0500 X-fm-smtp-source: yes Original-Received: from localhost (localhost [84.236.81.85]) by web-out.onbox.hu (Postfix) with SMTP id 48TYzp4ntxzZxJ for ; Fri, 28 Feb 2020 16:56:06 +0100 (CET) X-AccountId: 57978162 X-Originating-Ip: 84.236.81.85 X-VR-SPAMSTATE: OK X-VR-SPAMSCORE: 0 X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedugedrleekgdektdcutefuodetggdotefrodftvfcurfhrohhfihhlvgemucggtfgfnhhsuhgsshgtrhhisggvpdcuhfftgffgofetkffnnecuuegrihhlohhuthemuceftddtnecunecujfgurhepfffhkffugggtvfhisegrtdersgdttddunecuhfhrohhmpehnuggrmhgvuceovghmrggtshhushgvrhesfhhrvggvmhgrihhlrdhhuheqnecukfhppeekgedrvdefiedrkedurdekheenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhephhgvlhhopedpihhnvghtpeekgedrvdefiedrkedurdekhedpmhgrihhlfhhrohhmpegvmhgrtghsuhhsvghrsehfrhgvvghmrghilhdrhhhupdhrtghpthhtohepsghughdqghhnuhdqvghmrggtshesghhnuhdrohhrgh X-detected-operating-system: by eggs.gnu.org: FreeBSD 9.x [fuzzy] X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:176588 Archived-At: ------=_Part_17475_292461959.1582905171370 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable I use Emacs 26.2 on Windows and usually I send my computer to sleep, instead of switching it off. That means the same Emacs instance runs for weeks or even months unless Emacs crashes for some reason. I use several timers for housekeeping tasks and they usually work, but from time to time one of them fails to start after coming back from sleep. When I do an M-x list-timers the affected timer is still there, but its value in the Next column is negative. The value keeps decreasing like for other timers, but since the value is negative it gets farther and farther from zero, so it never fires after that. I assume some calculation between the real time and the expected elapsed time sets the timer value to negative after sleep. A possible fix may be to ensure that the Next value of the timer cannot be negative. =C2=A0 ------=_Part_17475_292461959.1582905171370 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit I use Emacs 26.2 on Windows and usually I send my computer to sleep,
instead of switching it off. That means the same Emacs instance runs
for weeks or even months unless Emacs crashes for some reason.

I use several timers for housekeeping tasks and they usually work, but
from time to time one of them fails to start after coming back from
sleep.

When I do an M-x list-timers the affected timer is still there, but
its value in the Next column is negative. The value keeps decreasing
like for other timers, but since the value is negative it gets farther
and farther from zero, so it never fires after that.

I assume some calculation between the real time and the expected
elapsed time sets the timer value to negative after sleep.

A possible fix may be to ensure that the Next value of the timer
cannot be negative.
  ------=_Part_17475_292461959.1582905171370--