From 6a9f26845688e93867f2e949d589d1b3bc83e4bd Mon Sep 17 00:00:00 2001 From: root Date: Mon, 14 Feb 2005 19:37:16 +0000 Subject: [PATCH] *** empty log message *** --- Changes | 2 +- src/iom.C | 12 +++++++++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/Changes b/Changes index d2fc6c4f..143487dc 100644 --- a/Changes +++ b/Changes @@ -2,7 +2,6 @@ TODO: manpage 900mb update TODO: safer command: keymap processing. TODO: "slow" rendering mode for bidi and scripts TODO: read property sequence is broken with respect to utf-8 etc. -TODO: try to compensate for backwards-time-changes in iom.C (no way to do that for forward-time-changes, or reliably for long timeouts). WISH: keyboard modification via esc-sequences. WISH: line-rewrapping on resize WISH: searchable backlog @@ -22,6 +21,7 @@ WISH: just for fun, do shade and tint with XRender. - add COPYING back, which got lost somehow. - after deciding that LSM is dead, remove all traces of it, along with other, similar, cleanups. + - _try_ to react sensibly to some non-monotonic time changes. 5.0 Fri Feb 11 18:31:48 CET 2005 - document a race-free hack to start urxvtd. diff --git a/src/iom.C b/src/iom.C index 8754d05c..467aef86 100644 --- a/src/iom.C +++ b/src/iom.C @@ -382,7 +382,17 @@ void io_manager::loop () # endif # if IOM_TIME - set_now (); + { + // update time, try to compensate for gross non-monotonic time changes + tstamp diff = NOW; + set_now (); + diff = NOW - diff; + + if (diff < 0) + for (io_manager_vec::const_iterator i = tw.end (); i-- > tw.begin (); ) + if (*i) + (*i)->at += diff; + } # endif if (fds > 0) -- 2.34.1