ref: a691c9111a69257e206ce895d35396d0f6225929
dir: /clock.c/
#include "u.h" #include "../port/lib.h" #include "mem.h" #include "dat.h" #include "fns.h" #include "io.h" #include "ureg.h" static uvlong freq; enum { Enable = 1<<0, Imask = 1<<1, Istatus = 1<<2, }; void clockshutdown(void) { } static void localclockintr(Ureg *ureg, void *) { } void clockinit(void) { } void timerset(uvlong next) { } uvlong fastticks(uvlong *hz) { return 0; } ulong perfticks(void) { return fastticks(nil); } ulong µs(void) { uvlong hz; uvlong t = fastticks(&hz); return (t * 1000000ULL) / hz; } void microdelay(int n) { ulong now; now = µs(); while(µs() - now < n); } void delay(int n) { while(--n >= 0) microdelay(1000); } void synccycles(void) { }