/[gxemul]/trunk/src/timer.c
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /trunk/src/timer.c

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

revision 42 by dpavlin, Mon Oct 8 16:22:32 2007 UTC revision 44 by dpavlin, Mon Oct 8 16:22:56 2007 UTC
# Line 25  Line 25 
25   *  SUCH DAMAGE.   *  SUCH DAMAGE.
26   *   *
27   *   *
28   *  $Id: timer.c,v 1.9 2007/06/15 17:02:38 debug Exp $   *  $Id: timer.c,v 1.11 2007/06/18 04:23:19 debug Exp $
29   *   *
30   *  Timer framework. This is used by emulated clocks.   *  Timer framework. This is used by emulated clocks.
31   */   */
# Line 176  static void timer_tick(int signal_nr) Line 176  static void timer_tick(int signal_nr)
176                  }                  }
177  #endif  #endif
178    
179                  timer_current_time = tv.tv_usec * 0.000001 + tv.tv_sec;                  /*  Get exponentially closer to the real time, instead of
180                        just changing to it directly:  */
181                    timer_current_time = ( (tv.tv_usec * 0.000001 + tv.tv_sec) +
182                        timer_current_time ) / 2;
183    
184                  timer_countdown_to_next_gettimeofday = timer_freq *                  timer_countdown_to_next_gettimeofday = timer_freq *
185                      SECONDS_BETWEEN_GETTIMEOFDAY_SYNCH;                      SECONDS_BETWEEN_GETTIMEOFDAY_SYNCH;

Legend:
Removed from v.42  
changed lines
  Added in v.44

  ViewVC Help
Powered by ViewVC 1.1.26