#NEWLINE# def hold( name , seconds ) : #NEWLINE# #INDENT# '\n    Wait for a given period of time, then fire a result of True, requireing\n    this state allows for an action to be blocked for evaluation based on\n    time\n    ' #NEWLINE# ret = { #NEWLINE# #INDENT# 'name' : name , #NEWLINE# 'result' : False , #NEWLINE# 'comment' : '' , #NEWLINE# 'changes' : { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } , #NEWLINE# #UNINDENT# } #NEWLINE# start = time . time ( ) #NEWLINE# if ( 'timer' not in __context__ ) : #NEWLINE# #INDENT# __context__ [ 'timer' ] = { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } #NEWLINE# #UNINDENT# if ( name not in __context__ [ 'timer' ] ) : #NEWLINE# #INDENT# __context__ [ 'timer' ] [ name ] = start #NEWLINE# #UNINDENT# if ( ( seconds - __context__ [ 'timer' ] [ name ] ) > seconds ) : #NEWLINE# #INDENT# ret [ 'result' ] = True #NEWLINE# __context__ [ 'timer' ] [ name ] = start #NEWLINE# #UNINDENT# return ret