I want to get a monotonic clock on IRIX, like:
clock_gettime(CLOCK_MONOTONIC, &t);
But CLOCK_MONOTONIC doesn't exist on IRIX.
It has CLOCK_SGI_CYCLE, but that (as the names says) cycles too often (about every 90s on my machine in case you're interested).
Is there any other (fairly high-res) clock that I can use, that isn't affected by time changes (ntp or other)?
_rtc is the fastest clock in the system that doesn't wrap. It's a compiler extension, so I think you'll have to use the SGI compilers. If "fairly high-res" is good enough, it will probably be fine; if you need even better resolution, you'll have to hack together a combination of it with CLOCK_SGI_CYCLE.
http://docs.sgi.com/library/tpl/cgi-bin/getdoc.cgi?cmd=getdoc&coll=0650&db=man&fname=3%20RTC