Changed node inside AsyncLoop not reacting

I am playing around with an AsyncLoop and wondered why the changed node after the stopwatch is not true in this case? The Stopwatch is working, I can see the number increase on the output, but the Boolean stays false.

The MainLoop node only controls the vvvv main loop, it is a singleton. So your loop runs as fast as it can, which is probably faster than the stopwatch is updating. The Stopwatch uses the main clock, which is a frame clock, so it updates the time only once per vvvv frame. If you want to change that, you have to connect a different clock by enabling the hidden input pins.

Try a Sampler instead of the HoldLatest and see how many events you miss in the much slower main loop of vvvv and some of the events there should contain true in the moment when the stopwatch changes its value.

if you want to slow down the loop use a Thread sleep for waiting or if you need very precise timing, use a BusyWaitTimer instead of the AsyncLoop.

1 Like

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.