SGI hardware timer mapping

This code is provided as is. The code to actually map the hardware comes from the SGI manual page for syssgi(2). Please give credit if you use large portions of this code or a duplicate implementation.

Features

Notes
There are two files, time.h and time.c. The header file is quite straightforward. The implementation module uses some system calls to determine what type of processor you have. This information is used to determine the timer length (24, 32, or 64 bits). We only use the low-order 32-bits of the 64-bit timers. This gives a maximum length of about 90 seconds between accesses to a timer. Since we use this in a real-time system, this is quite sufficient.

See the comments in the code for more details about the how and why.

time.h
time.c