Home | History | Annotate | Line # | Download | only in libsa
      1 /*	$NetBSD: clock.c,v 1.4 2009/01/12 11:32:45 tsutsui Exp $	*/
      2 
      3 
      4 #include <sys/types.h>
      5 #include <machine/mon.h>
      6 
      7 #include "libsa.h"
      8 #include "net.h"
      9 
     10 int hz = 1000;
     11 
     12 satime_t
     13 getsecs(void)
     14 {
     15 	long ticks;
     16 
     17 	ticks = getticks();
     18 	return ((ticks / hz));
     19 }
     20 
     21 long
     22 getticks(void)
     23 {
     24 	long ticks;
     25 
     26 	ticks = *romVectorPtr->nmiClock;
     27 	return (ticks);
     28 }
     29