need help about time.sleep, timer

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Sinan Nalkaya

    #1

    need help about time.sleep, timer

    hello,
    i need a function like that,
    wait 5 seconds:
    (during wait) do the function
    but function waits for keyboard input so if you dont enter any it waits
    forever.
    i tried time.sleep() but when i used time.sleep in while, the function
    in while never executed.
    then i found something about Timer but couldnt realize any algorithm in
    my mind.
    i`ll use the function like remote controller. as you know in remote
    controllers, tv waits you for second number input. if you dont press
    any, executes the first number that you have entered.
    thanks.
Working...