bug#39099: 26.3; display-time delay after PC sleep

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

bug#39099: 26.3; display-time delay after PC sleep

ynyaaa

Enabling display-time, the time string is updated every 0 second.
If PC is awaked after sleep, the update timing is changed.


In GNU Emacs 26.3 (build 1, x86_64-w64-mingw32)
 of 2019-08-29 built on CIRROCUMULUS
Repository revision: 96dd0196c28bc36779584e47fffcca433c9309cd
Windowing system distributor 'Microsoft Corp.', version 6.3.9600
Recent messages:

Configured using:
 'configure --without-dbus --host=x86_64-w64-mingw32
 --without-compress-install 'CFLAGS=-O2 -static -g3''

Configured features:
XPM JPEG TIFF GIF PNG RSVG SOUND NOTIFY ACL GNUTLS LIBXML2 ZLIB
TOOLKIT_SCROLL_BARS THREADS LCMS2

Important settings:
  value of $LANG: JPN
  locale-coding-system: cp932

Major mode: Emacs-Lisp

Minor modes in effect:
  tooltip-mode: t
  global-eldoc-mode: t
  eldoc-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  tool-bar-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  line-number-mode: t
  transient-mark-mode: t

Load-path shadows:
None found.

Features:
(network-stream nsm starttls tls gnutls mailalias smtpmail auth-source
tabify pp shadow sort mail-extr emacsbug message rmc puny seq dired
dired-loaddefs format-spec rfc822 mml mml-sec password-cache epa derived
epg epg-config gnus-util rmail rmail-loaddefs mm-decode mm-bodies
mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail
rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils cus-edit
cus-start cus-load wid-edit pulse eieio-opt speedbar sb-image ezimage
dframe find-func thingatpt xref cl-seq project ring eieio eieio-core
cl-macs eieio-loaddefs misearch multi-isearch cl-extra help-fns
radix-tree cl-print byte-opt gv bytecomp byte-compile cconv debug
help-mode easymenu cl-loaddefs cl-lib elec-pair time-date mule-util
japan-util tooltip eldoc electric uniquify ediff-hook vc-hooks
lisp-float-type mwheel dos-w32 ls-lisp disp-table term/w32-win w32-win
w32-vars term/common-win tool-bar dnd fontset image regexp-opt fringe
tabulated-list replace newcomment text-mode elisp-mode lisp-mode
prog-mode register page menu-bar rfn-eshadow isearch timer select
scroll-bar mouse jit-lock font-lock syntax facemenu font-core
term/tty-colors frame cl-generic cham georgian utf-8-lang misc-lang
vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms cp51932
hebrew greek romanian slovak czech european ethiopic indian cyrillic
chinese composite charscript charprop case-table epa-hook jka-cmpr-hook
help simple abbrev obarray minibuffer cl-preloaded nadvice loaddefs
button faces cus-face macroexp files text-properties overlay sha1 md5
base64 format env code-pages mule custom widget hashtable-print-readable
backquote threads w32notify w32 lcms2 multi-tty make-network-process
emacs)

Memory information:
((conses 16 150681 39356)
 (symbols 48 25665 2)
 (miscs 40 237 564)
 (strings 32 41690 1772)
 (string-bytes 1 1070389)
 (vectors 16 19392)
 (vector-slots 8 695666 19450)
 (floats 8 75 361)
 (intervals 56 2449 198)
 (buffers 992 23))



Reply | Threaded
Open this post in threaded view
|

bug#39099: 26.3; display-time delay after PC sleep

ynyaaa
Stefan Kangas <[hidden email]> writes:

> [hidden email] writes:
>
>> Enabling display-time, the time string is updated every 0 second.
>> If PC is awaked after sleep, the update timing is changed.
>>
>> In GNU Emacs 26.3 (build 1, x86_64-w64-mingw32)
>>  of 2019-08-29 built on CIRROCUMULUS
>> Repository revision: 96dd0196c28bc36779584e47fffcca433c9309cd
>> Windowing system distributor 'Microsoft Corp.', version 6.3.9600
>
> Do you see this when running under "emacs -Q"?
>
> What is the value of the `display-time-format' variable?
>
> Do you mean that it updates every second before sleep?
>
> How often does it update after you awaken after sleep?
>
> Best regards,
> Stefan Kangas

I tested following operations and got log.

Start emacs -Q
Setup logging
  (setq display-time-hook
        (lambda ()
          (with-current-buffer (get-buffer-create "display time log")
            (goto-char (point-max))
            (insert (current-time-string now) ?\n))))
M-x display-time (16:01)
Wait for a while.
Sleep PC. (16:10)
Wait for a while.
Wake up PC. (16:29)
Wait for a while.
M-x display-time (16:36)

Explicitly calling display-time restarts display-time-timer.
Following lines are the contents of "display time log" buffer.

Thu Jan 23 16:01:03 2020
Thu Jan 23 16:02:00 2020
Thu Jan 23 16:03:00 2020
Thu Jan 23 16:04:00 2020
Thu Jan 23 16:05:00 2020
Thu Jan 23 16:06:00 2020
Thu Jan 23 16:07:00 2020
Thu Jan 23 16:08:00 2020
Thu Jan 23 16:09:00 2020
Thu Jan 23 16:10:00 2020
Thu Jan 23 16:29:43 2020
Thu Jan 23 16:29:43 2020
Thu Jan 23 16:30:43 2020
Thu Jan 23 16:31:43 2020
Thu Jan 23 16:32:43 2020
Thu Jan 23 16:33:43 2020
Thu Jan 23 16:34:43 2020
Thu Jan 23 16:35:43 2020
Thu Jan 23 16:36:43 2020
Thu Jan 23 16:36:59 2020
Thu Jan 23 16:37:00 2020
Thu Jan 23 16:38:00 2020
Thu Jan 23 16:39:00 2020
Thu Jan 23 16:40:00 2020



Reply | Threaded
Open this post in threaded view
|

bug#39099: 26.3; display-time delay after PC sleep

Stefan Kangas
[hidden email] writes:

> I tested following operations and got log.

I don't have access to a Windows machine so I'll leave investigating
this further to someone else.  Thanks for provididing those details.

Best regards,
Stefan Kangas



Reply | Threaded
Open this post in threaded view
|

bug#39099: 26.3; display-time delay after PC sleep

Eli Zaretskii
> From: Stefan Kangas <[hidden email]>
> Date: Thu, 23 Jan 2020 15:39:33 +0100
> Cc: [hidden email]
>
> I don't have access to a Windows machine so I'll leave investigating
> this further to someone else.

I don't think this is specific to Windows.  The underlying problem
here is that our timers are interval timers: the next time a timer
fires is set by adding the interval to the time it fires now.  So if
Emacs doesn't get CPU for a long time, it will start counting time
from the first moment it gets CPU again.