summaryrefslogtreecommitdiff
path: root/sys/arch/sun3/stand/libsa/clock.c
blob: e5d347521d78502441a890a8d9b0a7724ebaa7be (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24

#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 MachMonRomVector * romvec;
	register int ticks;

	romvec = romVectorPtr;
	ticks = *(romvec->nmiClock);

	return (ticks);
}