Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > Low resolution of cpu times returned by getrusage

Reply
Thread Tools

Low resolution of cpu times returned by getrusage

 
 
Matthias Oberlaender
Guest
Posts: n/a
 
      07-28-2003
My problem is that cpu times returned by getrusage seem to be rounded to 10
ms units (so also does time.clock).

I never noticed such a low resolution in previous versions. Since I have not
found similar reports on the web, it probably is not a general bug in
(rather outdated) version 2.2.1. Any idea what could be wrong with this
peculiar installation?

Thanks a lot!

Python 2.2.1 (#3, May 3 2002, 16:42:06)
[GCC 2.95.3 20010315 (SuSE)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import resource
>>> print resource.getrusage(resource.RUSAGE_SELF)

(0.01, 0.040000000000000001, 0, 0, 0, 0, 186, 410, 0, 0, 0, 0, 0, 0, 0, 0)
>>> for i in range(1000000): pass

....
>>> print resource.getrusage(resource.RUSAGE_SELF)

(0.26999999999999996, 0.059999999999999998, 0, 0, 0, 0, 4116, 414, 0, 0, 0,
0, 0, 0, 0, 0)

--
____ __ _/_/ .
( / / ( / / / /

================================================== ===================
Matthias Oberlaender, DaimlerChrysler AG, Research Center Ulm
RIC/AP (Machine Perception)
Wilhelm-Runge-Str. 11, P.O. Box 2360, 89013 Ulm, Germany
Phone: +49 731 505 2354 Fax: +49 731 505 4105
Email: http://www.velocityreviews.com/forums/(E-Mail Removed)
================================================== ===================

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Pcos low carb diet. Low carb diet program. Cholesterol low carb diet.Low carb diet foods. zyraco C++ 0 11-10-2009 01:44 PM
Low carb diabetes diet. Low fat high carb diet. The low carb diet.Low carb diet pregnancy. zyraco C++ 0 11-10-2009 01:44 PM
Low carb calorie diet. No low carb diet. Free low carb diet. Low carbdiet meal plan. zyraco C++ 0 11-10-2009 01:44 PM
Low Fat, Low Carb, Low Calorie and every other crazy fad diet youhave tried. ruxandra C++ 0 04-14-2009 07:00 PM
getrusage Stuart D. Gathman Python 2 09-11-2003 05:14 AM



Advertisments