/[dotgnu-pnet]/pnetlib/Xsharp/Timer.cs
ViewVC logotype

Diff of /pnetlib/Xsharp/Timer.cs

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.4 by rweather, Tue Jul 22 01:22:51 2003 UTC revision 1.5 by darkdust, Fri May 6 09:03:41 2005 UTC
# Line 512  public sealed class Timer : IDisposable Line 512  public sealed class Timer : IDisposable
512                                                          // The timeout has already fired or is about to.                                                          // The timeout has already fired or is about to.
513                                                          return 0;                                                          return 0;
514                                                  }                                                  }
515                                                  else if(diff > (100 * TimeSpan.TicksPerSecond))                                                  else if (diff > (dpy.timerQueue.period * TimeSpan.TicksPerMillisecond))
516                                                    {
517                                                            // The next due time is farther away than the time period we're
518                                                            // supposed to wait. This propably means the system clock has
519                                                            // been turned back (either manually or by NTP). In this case
520                                                            // we must calculate a new due time and just return 0.
521                                                            dpy.timerQueue.nextDue = DateTime.UtcNow + new TimeSpan
522                                                                    (dpy.timerQueue.period * TimeSpan.TicksPerMillisecond);
523                                                            return 0;
524                                                    }
525                                                    else if (diff > (100 * TimeSpan.TicksPerSecond))
526                                                  {                                                  {
527                                                          // Don't wait more than 100 seconds at a time.                                                          // Don't wait more than 100 seconds at a time.
528                                                          return 100000;                                                          return 100000;

Legend:
Removed from v.1.4  
changed lines
  Added in v.1.5

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26