NetBSD/sys/arch/sun3/stand/libsa/clock.c

28 lines
310 B
C
Raw Normal View History

1998-02-05 07:56:24 +03:00
/* $NetBSD: clock.c,v 1.4 1998/02/05 04:57:06 gwr Exp $ */
1998-01-05 10:02:46 +03:00
1995-06-02 00:37:44 +04:00
#include <sys/types.h>
#include <machine/mon.h>
1998-02-05 07:56:24 +03:00
#include "libsa.h"
1995-06-02 00:37:44 +04:00
int hz = 1000;
1998-02-05 07:56:24 +03:00
long
getsecs()
1995-06-02 00:37:44 +04:00
{
1998-02-05 07:56:24 +03:00
long ticks;
ticks = getticks();
return ((ticks / hz));
1995-06-02 00:37:44 +04:00
}
1998-02-05 07:56:24 +03:00
long
getticks()
1995-06-02 00:37:44 +04:00
{
1998-02-05 07:56:24 +03:00
long ticks;
1995-06-02 00:37:44 +04:00
1997-02-05 20:39:21 +03:00
ticks = *romVectorPtr->nmiClock;
1995-06-02 00:37:44 +04:00
return (ticks);
}