From d078b12e15c5b8d71d566d7c2b5073c45b19d906 Mon Sep 17 00:00:00 2001 From: mickey Date: Thu, 30 Mar 2000 16:33:27 +0000 Subject: [PATCH] smarter heartbeat() --- sys/arch/hppa/hppa/autoconf.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/sys/arch/hppa/hppa/autoconf.c b/sys/arch/hppa/hppa/autoconf.c index 9f54f415159..7db2f1dfd91 100644 --- a/sys/arch/hppa/hppa/autoconf.c +++ b/sys/arch/hppa/hppa/autoconf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: autoconf.c,v 1.8 2000/03/29 23:11:12 mickey Exp $ */ +/* $OpenBSD: autoconf.c,v 1.9 2000/03/30 16:33:27 mickey Exp $ */ /* * Copyright (c) 1998-2000 Michael Shalayeff @@ -107,7 +107,7 @@ configure() #ifdef USELEDS timeout_set(&heartbeat_tmo, heartbeat, NULL); - timeout_add(&heartbeat_tmo, hz / 8); + heatbeat(NULL); #endif } @@ -133,11 +133,14 @@ heartbeat(v) * _| |_| |_,_,_,_ * 0 1 2 3 4 6 7 */ - if (hbcnt % 8 < 4) + if (hbcnt < 4) { ledctl(0, 0, PALED_HEARTBEAT); - hbcnt++; - - timeout_add(&heartbeat_tmo, hz / 8); + hbcnt++; + timeout_add(&heartbeat_tmo, hz / 8); + } else { + hbcnt = 0; + timeout_add(&heartbeat_tmo, hz / 2); + } } #endif -- 2.20.1