/* testpmt * * compares the current clock against the acpi_pm hardware timer, * and reports the error in ppm (parts in 1000000). * When clocksource=acpi_pm, and ntpd is not started, then * the output of this program should approach 0.000 * * * compile with gcc -O2 -o testpmt testpmt.c * * Kasper Pedersen * */ #include #include #include #define TPORT 0x808 FIXME: grep dmesg for PM-Timer and put the address here int main(void) { unsigned a,b; struct timeval tv; double t,t0,tik0; unsigned long long tik,basetik; basetik=b=tik0=0; ioperm(TPORT,4,1); for (;;) { a=inl(TPORT) & 0xffffff; gettimeofday(&tv,NULL); if (a