Re: time.time or time.clock

2008-01-14 Thread John Machin
On Jan 15, 4:50 am, [EMAIL PROTECTED] wrote: > """ > > time.clock() isn't high enough resolution for Ubuntu, and time.time() > isn't > high enough resolution on windows. > > Take a look at datetime. It is good to the micro-second on Linux and > milli-second on Windows. > """ On Windows, time.clo

Re: time.time or time.clock

2008-01-14 Thread Fredrik Lundh
[EMAIL PROTECTED] wrote: > """ > > time.clock() isn't high enough resolution for Ubuntu, and time.time() > isn't > high enough resolution on windows. > > Take a look at datetime. It is good to the micro-second on Linux and > milli-second on Windows. datetime.datetime.now() does the same thing

Re: time.time or time.clock

2008-01-14 Thread dwblas
""" time.clock() isn't high enough resolution for Ubuntu, and time.time() isn't high enough resolution on windows. Take a look at datetime. It is good to the micro-second on Linux and milli-second on Windows. """ import datetime begin_time=datetime.datetime.now() for j in range(10): x =

Re: time.time or time.clock

2008-01-13 Thread Ron Adam
Fredrik Lundh wrote: > John Machin wrote: > >> AFAICT that was enough indication for most people to use time.clock on >> all platforms ... > > which was unfortunate, given that time.clock() isn't even a proper clock > on most Unix systems; it's a low-resolution sample counter that can > happi

Re: time.time or time.clock

2008-01-13 Thread Ron Adam
John Machin wrote: > On Jan 14, 7:05 am, Ron Adam <[EMAIL PROTECTED]> wrote: >> I'm having some cross platform issues with timing loops. It seems >> time.time is better for some computers/platforms and time.clock others, but > > Care to explain why it seems so? > >> it's not always clear which

Re: time.time or time.clock

2008-01-13 Thread Fredrik Lundh
John Machin wrote: > AFAICT that was enough indication for most people to use time.clock on > all platforms ... which was unfortunate, given that time.clock() isn't even a proper clock on most Unix systems; it's a low-resolution sample counter that can happily assign all time to a process that

Re: time.time or time.clock

2008-01-13 Thread John Machin
On Jan 14, 7:05 am, Ron Adam <[EMAIL PROTECTED]> wrote: > I'm having some cross platform issues with timing loops. It seems > time.time is better for some computers/platforms and time.clock others, but Care to explain why it seems so? > it's not always clear which, so I came up with the followin

time.time or time.clock

2008-01-13 Thread Ron Adam
I'm having some cross platform issues with timing loops. It seems time.time is better for some computers/platforms and time.clock others, but it's not always clear which, so I came up with the following to try to determine which. import time # Determine if time.time is better than t