summaryrefslogtreecommitdiffstats
path: root/sys/net/if_sl.c
diff options
context:
space:
mode:
authorandre <andre@FreeBSD.org>2005-09-19 22:27:07 +0000
committerandre <andre@FreeBSD.org>2005-09-19 22:27:07 +0000
commitb2bf25e5cd5fc02fa46d9db548cf496f7ed135b8 (patch)
tree49f1fb3532ac2204a4634836a0f53993993ca4fa /sys/net/if_sl.c
parent9a84c48b48266e34d6e7abafd7d94b16eb655b71 (diff)
downloadFreeBSD-src-b2bf25e5cd5fc02fa46d9db548cf496f7ed135b8.zip
FreeBSD-src-b2bf25e5cd5fc02fa46d9db548cf496f7ed135b8.tar.gz
Use monotonic time_uptime instead of 'time_second' as timebase
for timeouts.
Diffstat (limited to 'sys/net/if_sl.c')
-rw-r--r--sys/net/if_sl.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/net/if_sl.c b/sys/net/if_sl.c
index a03ba1c..fefd6b6 100644
--- a/sys/net/if_sl.c
+++ b/sys/net/if_sl.c
@@ -876,15 +876,15 @@ slinput(int c, struct tty *tp)
* this one is within the time limit.
*/
if (sc->sc_abortcount &&
- time_second >= sc->sc_starttime + ABT_WINDOW)
+ time_uptime >= sc->sc_starttime + ABT_WINDOW)
sc->sc_abortcount = 0;
/*
* If we see an abort after "idle" time, count it;
* record when the first abort escape arrived.
*/
- if (time_second >= sc->sc_lasttime + ABT_IDLE) {
+ if (time_uptime >= sc->sc_lasttime + ABT_IDLE) {
if (++sc->sc_abortcount == 1)
- sc->sc_starttime = time_second;
+ sc->sc_starttime = time_uptime;
if (sc->sc_abortcount >= ABT_COUNT) {
slclose(tp,0);
return 0;
@@ -892,7 +892,7 @@ slinput(int c, struct tty *tp)
}
} else
sc->sc_abortcount = 0;
- sc->sc_lasttime = time_second;
+ sc->sc_lasttime = time_uptime;
}
switch (c) {
OpenPOWER on IntegriCloud