This is derived from alpha/microtime.c and i386/tsc_microtime.c, and will share with both ports. This should fix PR port-sparc64/18452. (approved by martin)