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