Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.gui > #3937
| From | "John B. Matthews" <john.b..matthews@THRWHITE.remove-dii-this> |
|---|---|
| Subject | Re: Problem with Swing Ti |
| Message-ID | <nospam-925EB4.13553609082008@web.aioe.org> (permalink) |
| Newsgroups | comp.lang.java.gui |
| References | <489dc941$0$4017$b9f67a60@news.newsdemon.com> |
| Date | 2011-04-27 15:47 +0000 |
| Organization | TDS.net |
To: comp.lang.java.gui In article <489dc941$0$4017$b9f67a60@news.newsdemon.com>, Knute Johnson <nospam@rabbitbrush.frazmtn.com> wrote: > Larry A Barowski wrote: > > <ifarberov@lsplab.com> wrote in message > > news:3f05236e-f599-41ec-9ac9-2ff561d6b7b9@s50g2000hsb.googlegroups.com... > >> After reading some of the above suggestions I have developed a new > >> theory of what may be going on. It seems that if a computer clock > >> is adjusted backwards while swing timer is used, the timer stops > >> firing action events. And as a matter of fact my program does > >> speed up system clock. Once in a while the computer clock in > >> syncronized with the network clock, which may push my computer > >> clock back. > > > > Just write your own timer and timer queue classes using > > nanoTime() and the nano version of wait(). > > > I think that's going to have the same problem is she changes the > system clock. Yes, particularly if the clock is stepped backward. It should be possible to use ntp to adjust the local clock in a manner that mitigates this, assuming the local network has (or allows access to) suitable time sources: <http://en.wikipedia.org/wiki/Network_Time_Protocol> <http://en.wikipedia.org/wiki/Clock_synchronization> <http://www.ntp.org/> "Under ordinary conditions, ntpd slews the clock so that the time is effectively continuous and never runs backwards." In practice, a clock that's way off may take a long time to adjust at the nominal slew rate, which is limited to 0.5 ms/s. Starting ntpd with -g is a reasonable alternative: <http://www.ece.udel.edu/~mills/ntp/html/ntpd.html> -- John B. Matthews trashgod at gmail dot com home dot woh dot rr dot com slash jbmatthews --- * Synchronet * The Whitehouse BBS --- whitehouse.hulds.com --- check it out free usenet! --- Synchronet 3.15a-Win32 NewsLink 1.92 Time Warp of the Future BBS - telnet://time.synchro.net:24
Back to comp.lang.java.gui | Previous | Next | Find similar | Unroll thread
Re: Problem with Swing Ti "John B. Matthews" <john.b..matthews@THRWHITE.remove-dii-this> - 2011-04-27 15:47 +0000
csiph-web