summaryrefslogtreecommitdiff
path: root/sys/arch/sun3/stand/libsa/clock.c
blob: e0d70171b5bf2dcbdec681fef5e7da3d6adcdba9 (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
25
26
/*	$OpenBSD: clock.c,v 1.2 2001/07/04 08:33:47 niklas Exp $	*/


#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);
}