<div dir="ltr"><font face="georgia,serif"><br></font><br><div class="gmail_quote">On Wed, Jul 25, 2012 at 11:15 AM, Nadav Har'El <span dir="ltr"><<a href="mailto:nyh@math.technion.ac.il" target="_blank">nyh@math.technion.ac.il</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On Wed, Jul 25, 2012, Oleg Goldshmidt wrote about "Re: High-resolution user/system times?":<br>
<div class="im">> > Hi, as you know the time(1) command, and the times(2) system call is<br>
> > able to separate a process's running time into "user" and "system" time,<br>
> > measuring the CPU time in user space and kernel space respectively.<br>
> ><br>
> > However, these only have a jiffy (often 1/250 seconds) resultion.<br>
</div>>...<br>
><br>
> man 2 getrusage ?<br>
<br>
Thanks.<br>
<br>
The manual page seems promising, talking about microseconds, but I don't<br>
believe it actually has a microsecond resolution. I think it has the<br>
same jiffy resolution that times() has. Do you believe that it does<br>
have microsecond resolution?<br></blockquote><div><br>No, I know it doesn't. Actually, I looked the kernel code up, I do think that HZ is 100 (by default), and jiffies_to_usecs is faking it.<br><br>Maybe you need to resort to clock_gettime with CLOCK_REALTIME. Some mentioned related instrumentation earlier in this thread.<br>
<br></div><blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
I think we're starting to build here a long list of manual-page bugs...<br>
<div class="im"><br>
--<br>
Nadav Har'El | Wednesday, Jul 25 2012, 6 Av 5772<br>
<a href="mailto:nyh@math.technion.ac.il">nyh@math.technion.ac.il</a> |-----------------------------------------<br>
</div>Phone <a href="tel:%2B972-523-790466" value="+972523790466">+972-523-790466</a>, ICQ 13349191 |Evening news begins with 'Good evening',<br>
<a href="http://nadav.harel.org.il" target="_blank">http://nadav.harel.org.il</a> |and then proceeds to say why it isn't.<br>
</blockquote></div><br><br clear="all"><br>-- <br>Oleg Goldshmidt | <a href="mailto:oleg@goldshmidt.org" target="_blank">oleg@goldshmidt.org</a><br>
</div>