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 |
*/ |
*/ |
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; |