Deleted Added
full compact
42c42
< * $Id: kern_clock.c,v 1.58 1998/03/16 10:19:12 phk Exp $
---
> * $Id: kern_clock.c,v 1.59 1998/03/26 20:51:31 phk Exp $
99a100,101
> time_t time_second;
>
139d140
< struct timeval time;
226,230c227
< * Compute number of hz until specified time. Used to
< * compute third argument to timeout() from an absolute time.
< * XXX this interface is often inconvenient. We often just need the
< * number of ticks in a timeval, but to use hzto() for that we have
< * to add `time' to the timeval and do everything at splclock().
---
> * Compute number of ticks in the specified amount of time.
233c230
< hzto(tv)
---
> tvtohz(tv)
260,263c257,258
< s = splclock();
< sec = tv->tv_sec - time.tv_sec;
< usec = tv->tv_usec - time.tv_usec;
< splx(s);
---
> sec = tv->tv_sec;
> usec = tv->tv_usec;
274c269
< printf("hzto: negative time difference %ld sec %ld usec\n",
---
> printf("tvotohz: negative time difference %ld sec %ld usec\n",
290a286
>
291a288,304
> * Compute number of hz until specified time. Used to
> * compute third argument to timeout() from an absolute time.
> */
> int
> hzto(tv)
> struct timeval *tv;
> {
> register long sec, usec;
> struct timeval t2;
>
> getmicrotime(&t2);
> t2.tv_sec = tv->tv_sec - t2.tv_sec;
> t2.tv_usec = tv->tv_usec - t2.tv_usec;
> return (tvtohz(&t2));
> }
>
> /*
640,641c653
< time.tv_sec = tc->offset_sec;
< time.tv_usec = tc->offset_micro;
---
> time_second = tc->offset_sec;
714,715c726
< time.tv_usec = tc->offset_micro;
< time.tv_sec = tc->offset_sec;
---
> time_second = tc->offset_sec;