[Patches] [ python-Patches-645894 ] better timer resolution for profile.py

noreply@sourceforge.net noreply@sourceforge.net
Fri, 29 Nov 2002 16:17:55 -0800


Patches item #645894, was opened at 2002-11-29 16:17
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=645894&group_id=5470

Category: Library (Lib)
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: John-Mark Gurney (jmg)
Assigned to: Nobody/Anonymous (nobody)
Summary: better timer resolution for profile.py

Initial Comment:
On some platforms time.clock() does not return a high
resolution counter.  On FreeBSD, it's resolution is
only 1/128th of a second.  In order to get microsecond
accuracy, the getrusage syscall from resource needs to
be used.

Attached is a patch that uses getrusage from the
resource library in preference of os.clock.

This was done on behalf of Vernier Networks, Inc.

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=645894&group_id=5470