4

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)?

4

1 回答 1

2

_rtc 是系统中最快的不换行时钟。这是一个编译器扩展,所以我认为你必须使用 SGI 编译器。如果“相当高分辨率”足够好,那可能就可以了;如果您需要更好的分辨率,则必须将其与 CLOCK_SGI_CYCLE 组合在一起。

http://docs.sgi.com/library/tpl/cgi-bin/getdoc.cgi?cmd=getdoc&coll=0650&db=man&fname=3%20RTC

于 2010-04-02T21:43:48.207 回答