title: Are two successive calls to getrusage guaranteed to produce increasing results?
body: <p>In a program that calls <code>getrusage()</code> twice in order to obtain the time of a task by subtraction, I have once seen an assertion, saying that the time of the task should be nonnegative, fail. This, of course, cannot easily be reproduced, although I could write a specialized program that might reproduce it more easily.</p>
  
  <p>I have tried to find a guarantee that <code>getrusage()</code> increased along execution, but neither the man page on my system(Linux on x86-64) nor <a href="http://pubs.opengroup.org/onlinepubs/009695399/functions/getrusage.html" rel="nofollow">this system-independant description</a> say so explicitly.</p>
  
  <p>The behavior was observed on a physical computer, with several cores, and NTP running.</p>
  
  <p>Should I report a bug against the OS I am using? Am I asking too much when I expect <code>getrusage()</code> to increase with time?</p>