[openrtm-commit:00309] r435 - branches/RELENG_1_1/OpenRTM-aist-Python/OpenRTM_aist
openrtm @ openrtm.org
openrtm @ openrtm.org
2011年 8月 4日 (木) 15:57:58 JST
Author: kurihara
Date: 2011-08-04 15:57:57 +0900 (Thu, 04 Aug 2011)
New Revision: 435
Modified:
branches/RELENG_1_1/OpenRTM-aist-Python/OpenRTM_aist/Timer.py
Log:
The restart of the thread was enabled.
Modified: branches/RELENG_1_1/OpenRTM-aist-Python/OpenRTM_aist/Timer.py
===================================================================
--- branches/RELENG_1_1/OpenRTM-aist-Python/OpenRTM_aist/Timer.py 2011-08-02 12:15:10 UTC (rev 434)
+++ branches/RELENG_1_1/OpenRTM-aist-Python/OpenRTM_aist/Timer.py 2011-08-04 06:57:57 UTC (rev 435)
@@ -96,6 +96,7 @@
def join(self):
try:
self._thread.join()
+ self._thread = threading.Thread(target=self.run)
except:
pass
@@ -124,7 +125,8 @@
self.invoke()
if self._interval.tv_sec != 0:
time.sleep(self._interval.tv_sec)
- time.sleep(self._interval.tv_usec/1000000.0)
+ elif self._interval.tv_usec:
+ time.sleep(self._interval.tv_usec/1000000.0)
return 0
@@ -201,6 +203,7 @@
if self._tasks[i].remains.sign() <= 0.0:
self._tasks[i].listener.invoke()
self._tasks[i].remains = self._tasks[i].period
+ del guard
return
##
openrtm-commit メーリングリストの案内