[Tutor] Time - Less then a second
Isr Gish
isrgish at fusemail.com
Fri Jan 9 14:41:39 EST 2004
Thanks for the response.
exnihilo at myrealbox.com wrote:
>The following little snippet illustrates how time.clock() works. I've
>never used time.time() before though.
>
> >>> import random, time
> >>> def timeSort(l):
> start = time.clock()
> l.sort()
> print "Sort Time:", (time.clock() - start) * 1000, "milliseconds"
>
> >>> randList = [random.random() for i in range(100000)]
> >>> timeSort(randList)
>Sort Time: 190.0 milliseconds
My problem is that on my CE device I only get seconds, nothing less. TheforeI'm looking for an alternative.
-------
Isr Gish
More information about the Tutor
mailing list