Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # dynamic_timer.py ### ZZZ
- import time
- def t(): pass
- def m(): pass
- def delay(var,sec): ### moderate speed
- code="""if 1:
- try:
- t.@@@=m.@@@-time.time()
- except:
- m.@@@=time.time()+sec
- t.@@@=m.@@@-time.time()
- if int(t.@@@) < 0.000000001: t.@@@=0""".replace('@@@',var)
- exec code
- while 1:
- delay('five',5)
- delay('ten',10)
- print t.five,'\n\t\t',t.ten
- print
- if not t.ten:
- break
- #
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement