En Mon, 15 Mar 2010 03:51:28 -0300, hiral
escribió:
On Mar 15, 7:14 am, Tim Roberts wrote:
hiral wrote:
>Output:
>real0.0m0.010002421s
>user0.0m0.0s
>sys 0.0m0.0s
>Command:
>$ time ls
>Output:
>real0m0.007s
>user0m0.000s
>sys 0m0.000s
You can't really do an a
On Mar 15, 7:14 am, Tim Roberts wrote:
> hiral wrote:
> >...
> >Output:
> >real 0.0m0.010002421s
> >user 0.0m0.0s
> >sys 0.0m0.0s
>
> >Command:
> >$ time ls
>
> >Output:
> >real 0m0.007s
> >user 0m0.000s
> >sys 0m0.000s
>
> >Is this the intended behaviour?
>
> What is it th
hiral wrote:
>...
>Output:
>real0.0m0.010002421s
>user0.0m0.0s
>sys 0.0m0.0s
>
>
>Command:
>$ time ls
>
>Output:
>real0m0.007s
>user0m0.000s
>sys 0m0.000s
>
>
>Is this the intended behaviour?
What is it that you are wondering about? The formatting difference is due
to
Hi,
Python version: 2.6
Script:
def pt(start_time, end_time):
def ptime(time, time_str):
min, sec = divmod(time, 60)
hr, min = divmod(min, 60)
stmt = time_str + '\t'
if hr:
stmt += str(hr) + 'h'
stmt += str(min) + 'm' + str(sec) + 's'
Thank you, aspineux and Douglas.
Douglas's analysis is especially great.
I changed HZ to CLK_TCK in Python-2.5/Modules/posixmodule.c and
got the proper result!
$ time /usr/local/python2.5/bin/python ostimetest.rb
n=35, v=14930352
utime=12.42, stime=0.04
real0m1
Your analysis looks great, maybe the good arguments to report a bug ?
On 3 fév, 04:27, [EMAIL PROTECTED] (Douglas Wells) wrote:
> [various posting problems corrected and response interspersed in
> previous post for purposes of coherent response]
>
> In article <[EMAIL PROTECTED]>,
>
>
>
> "aspin
[various posting problems corrected and response interspersed in
previous post for purposes of coherent response]
In article <[EMAIL PROTECTED]>,
"aspineux" <[EMAIL PROTECTED]> writes:
> On 2 Feb, 19:30, [EMAIL PROTECTED] wrote:
> > Hi,
> >
> > I have a question about os.times().
> > os.times() re
I dont see anything wrong !
Did you try to measure time with your watch ?
Did you try a simple python test.py without the time command ?
Maybe python is 'disturbed' by the intel core
Here my result on a linux dual AMD, python 2.4.3
# time python test.py
n=35, v=14930352
utime=22.54, stime=0.02
Hi,
I have a question about os.times().
os.times() returns a tuple containing user time and system time,
but it is not matched to the result of 'time' command.
For example, os.times() reports that user time is 39.85 sec,
but 'time' command reports that user time is 28.55sec.
(machine: Python2.5, M