From cb69d2e1c7ced951cbf7a31ee286b0ed92cab8a8 Mon Sep 17 00:00:00 2001 From: rcoh Date: Fri, 18 Feb 2011 16:56:43 -0500 Subject: Adding Epydoc generated docs. --- html/SmootLight.behaviors.Timeout-pysrc.html | 129 +++++++++++++++++++++++++++ 1 file changed, 129 insertions(+) create mode 100644 html/SmootLight.behaviors.Timeout-pysrc.html (limited to 'html/SmootLight.behaviors.Timeout-pysrc.html') diff --git a/html/SmootLight.behaviors.Timeout-pysrc.html b/html/SmootLight.behaviors.Timeout-pysrc.html new file mode 100644 index 0000000..18b9b32 --- /dev/null +++ b/html/SmootLight.behaviors.Timeout-pysrc.html @@ -0,0 +1,129 @@ + + + + + SmootLight.behaviors.Timeout + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + Package SmootLight :: + Package behaviors :: + Module Timeout + + + + + + +
[hide private]
[frames] | no frames]
+
+

Source Code for Module SmootLight.behaviors.Timeout

+
+ 1  from operationscore.Behavior import * 
+ 2  import util.TimeOps as timeops 
+
3 -class Timeout(Behavior): +
4 """Timeout is a behavior designed to be used in recursive hooks to stop responses after a certain + 5 amount of time. It is the Time-version of RecursiveDecay. Specify: + 6 <TimeOut> -- the time in ms that the response will run. + 7 """ + 8 +
9 - def processResponse(self,sensorInputs, recur): +
10 ret = [] +11 for data in sensorInputs: +12 if not 'StartTime' in data: +13 data['StartTime'] = timeops.time() +14 if timeops.time()-data['StartTime'] < self['Timeout']: +15 ret.append(data) +16 return (ret,[]) +
17 +
+
+ + + + + + + + + + + + + + + + + + + + + + + +
+ + + + -- cgit v1.2.3