*** empty log message ***
authorroot <root>
Mon, 14 Feb 2005 19:37:16 +0000 (19:37 +0000)
committerroot <root>
Mon, 14 Feb 2005 19:37:16 +0000 (19:37 +0000)
Changes
src/iom.C

diff --git a/Changes b/Changes
index d2fc6c4ff8a40604666cd617bea0a1edd8c34049..143487dc57083588de60900cfce8c15cfd12f4e6 100644 (file)
--- 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.
index 8754d05c135a13563af4604bbd5f20dbce860a15..467aef8678a2a02cda7a2b987bf073ee1280495f 100644 (file)
--- 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<time_watcher>::const_iterator i = tw.end (); i-- > tw.begin (); )
+            if (*i)
+              (*i)->at += diff;
+      }
 # endif
 
       if (fds > 0)