<p>Does Linux/Unix/Posix provide an API to user-space applications to access a monotonically increasing clock, with centisecond to millisecond accuracy?</p>

<p>On Linux, /proc/uptime provides a string-based representation of a floating point number of the number of seconds the system has been up.</p>

<p>gettimeofday(2) does not provide a monotonically increasing clock.</p>

<p>I could use getitimer(2) in the ITIMER_REAL time domain, set the timer to start at the (platform dependent) maximum and ignore the signal generated, but according to the man page the longest the timer can run for is approximately 100 days, which is shorter than my expected run time.</p>

There is clock_gettime:
```
```
struct timespec tp;
clock_gettime(CLOCK_MONOTONIC, &tp);
```
```