Timed events
Laura Creighton
lac at strakt.com
Sat Feb 1 07:43:45 EST 2003
> Hi !
>
> i have a problem with 'time.sleep( )' on a NT-server. Considere this code :
>
> for i in range(0,999999):
Try this instead:
for i in xrange(0, 999999): # xrange(999999) will work here
> stime= time.strftime("%H:%M", time.localtime())
> time.sleep(59)
> if stime=='08:01' :
> ...
> print("...fini.")
> time.sleep(59)
>
> When this script run, NT give, with performer analysis : Time-CPU at 100%
> if i stop the script the Time-CPU go to 0%
>
> What do 'sleep( )' ?
>
> @-salutations
>
> Michel Claveau
>
>
>
> P.S. Sorry for my bad english ; French is more easy...
>
>
> --
> http://mail.python.org/mailman/listinfo/python-list
Come back if the performance is still poor. I don't think it is the
sleep that is your problem.
Laura Creighton
More information about the Python-list
mailing list