aboutsummaryrefslogtreecommitdiffstats
path: root/main/busybox/tod_s390x.c
blob: c39a584c829804d1f986910db25ddef3a096fe10 (plain)
1
2
3
4
5
6
7
8
#include <stdio.h>

void main(){
	unsigned long val;
	asm volatile("stck 0(%1)" : "=m" (val) : "a" (&val) : "cc");
	val = ((val >> 9) * 125) + (((val & 0x1ff) * 125) >> 9);
	printf("%lu", val / 1000000000UL - 2208988800);
}