Timed events

News M Claveau /Hamster-P essai1 at mci.local
Sat Feb 1 03:40:23 EST 2003


Hi !

i have a problem with 'time.sleep( )' on a NT-server.  Considere this code :

    for i in range(0,999999):
            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...






More information about the Python-list mailing list