Timer event in viztask
I am trying to detect when a timer has expired in order to capture the time it takes a person to respond to a change. Using viztask, my code looks something like
Code:
# Start a timer Thanks! |
Timer events behave differently than all other events. They are only sent to the event handler that started the timer. Also, waiting for any timer event doesn't seem very useful, since a lot of other vizard modules use timer events internally.
I would suggest using viztask.Signal objects. The documentation contains sample code for using task signals. The following code shows how to create a task signal: Code:
timer_signal = viztask.Signal() Code:
timer_signal.send() Code:
yield timer_signal.wait() |
All times are GMT -7. The time now is 07:46 AM. |
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Copyright 2002-2023 WorldViz LLC