summaryrefslogtreecommitdiffstats
path: root/sys/net
diff options
context:
space:
mode:
authorphk <phk@FreeBSD.org>1998-04-04 13:26:20 +0000
committerphk <phk@FreeBSD.org>1998-04-04 13:26:20 +0000
commit5e9a131f20894d1df9e8c1768be6eb1cc29a3cf4 (patch)
tree76909c92c472744745de10e5dacc307ea5f7af45 /sys/net
parentddcbf85eb29fd2d50ce1afa0243be370d4893370 (diff)
downloadFreeBSD-src-5e9a131f20894d1df9e8c1768be6eb1cc29a3cf4.zip
FreeBSD-src-5e9a131f20894d1df9e8c1768be6eb1cc29a3cf4.tar.gz
Time changes mark 2:
* Figure out UTC relative to boottime. Four new functions provide time relative to boottime. * move "runtime" into struct proc. This helps fix the calcru() problem in SMP. * kill mono_time. * add timespec{add|sub|cmp} macros to time.h. (XXX: These may change!) * nanosleep, select & poll takes long sleeps one day at a time Reviewed by: bde Tested by: ache and others
Diffstat (limited to 'sys/net')
-rw-r--r--sys/net/if_spppsubr.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/sys/net/if_spppsubr.c b/sys/net/if_spppsubr.c
index 0f890cb..74310e3 100644
--- a/sys/net/if_spppsubr.c
+++ b/sys/net/if_spppsubr.c
@@ -17,7 +17,7 @@
*
* From: Version 2.4, Thu Apr 30 17:17:21 MSD 1997
*
- * $Id: if_spppsubr.c,v 1.34 1998/03/01 06:01:33 bde Exp $
+ * $Id: if_spppsubr.c,v 1.35 1998/03/30 09:52:06 phk Exp $
*/
#include "opt_inet.h"
@@ -1018,8 +1018,10 @@ sppp_cisco_send(struct sppp *sp, int type, long par1, long par2)
struct ppp_header *h;
struct cisco_packet *ch;
struct mbuf *m;
- u_long t = (time_second - boottime.tv_sec) * 1000;
+ struct timeval tv;
+ getmicroruntime(&tv);
+
MGETHDR (m, M_DONTWAIT, MT_DATA);
if (! m)
return;
@@ -1036,8 +1038,8 @@ sppp_cisco_send(struct sppp *sp, int type, long par1, long par2)
ch->par1 = htonl (par1);
ch->par2 = htonl (par2);
ch->rel = -1;
- ch->time0 = htons ((u_short) (t >> 16));
- ch->time1 = htons ((u_short) t);
+ ch->time0 = htons ((u_short) (tv.tv_sec >> 16));
+ ch->time1 = htons ((u_short) tv.tv_sec);
if (debug)
log(LOG_DEBUG,
OpenPOWER on IntegriCloud