summaryrefslogtreecommitdiff
path: root/sys/arch/armish/stand/boot/time.c
blob: 1b0e9fcc838cfd925148602113f7d0bf95c805fd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
#include <sys/types.h>

#include "libsa.h"

time_t
getsecs(void)
{
	uint32_t count;

	__asm volatile ("mrc p6, 0, %0, c3, c1, 0" : "=r" (count));
	return ((0xffffffff - count) / 12500000);
}