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 ("mftb %0" : "=r" (count)); return (count / 66666666); }