[Tutor] Tutor] Re: newbie looking for code suggestions

Bob Roher shiska@swbell.net
Mon, 23 Sep 2002 00:35:39 -0500


Sorry for the spam everyone, I wanted to reply to everyone in one
message, but it was too messy.  :(


> I'm also getting 39662 on my solution.

That's a relief, I thought I had another problem to sort through.

> > > cpu: 28.121, total: 29.832
> >
> > Neat.  How do you get the cpu and total time to show up?
>
> Unix comes with a 'time' command, so if we have a program
called
> 'count_quotient_set.py' we can do:
>
>
> ###
> $ time ./count_quotient_set.py
> ###
>
> which should give us timing statistics after the program is
finished.
>

Ah, yet another reason I'm starting to feel cheated by running
Windows.  Is there a way to import time into the program, say
before the loop starts and have it compare start and stop times
to give some idea of cpu time?  I would like to have some idea of
time used when I try some of the ideas I've seen here.