Using OS time

valhalla tireseas at onetel.com
Fri Jun 20 19:34:12 CEST 2003


I wrote:
" I suppose a lengthier but more n00bie friendly way of doing this 'countdown' 
would be to countdown from a given number (e.g. 60) and import time.sleep to 
sleep for 1 second at each new iteration in the for loop. I think this would 
do the same thing."

-- er, no! Skip this one guys ... I have just answered my own question and 
eliminated sleep as a solution because while it is sleeping (which would be 
every second between decrementing counts which accumulates to the majority of 
the program really) the rest of the program becomes non-functioning - so the 
player couldn't interact with the game and the program couldn't process input 
or produce outputs ... i.e. not much of a game really!! 
Live and learn :-)
Back to the signal.alarm() suggestion from Skip.

Andy





-- 
====================
||  Reg. Linux User: 313143 ||
====================
Sign the Petition:
http://www.PetitionOnline.com/endtcpa1/





More information about the Python-list mailing list