test/utils/circular_buffer_test.py
def task(arr):
            '''
            A task that polls on a trigger for max 5 seconds,
            and when triggered, modifies the input array.
            '''
            timeout = 5
            now = time.time()

            while True:
                if arr.counter() == 3:
                    break
                time.sleep(0.01)
                if time.time() - now >= timeout:
                    raise TimeoutError
            arr.store(np.ones(2,))

            A task that polls on a trigger for max 5 seconds,
            and when triggered, modifies the input array.
            
A task that polls on a trigger for max 5 seconds,
and when triggered, modifies the input array.
A task that polls on a trigger for max 5 seconds and when triggered modifies the input array .
def task(arr):
            timeout = 5
            now = time.time()
            while True:
                if arr.counter() == 3:
                    break
                time.sleep(0.01)
                if time.time() - now >= timeout:
                    raise TimeoutError
            arr.store(np.ones(2,))
def task ( arr ) : timeout = 5 now = time . time ( ) while True : if arr . counter ( ) == 3 : break time . sleep ( 0.01 ) if time . time ( ) - now >= timeout : raise TimeoutError arr . store ( np . ones ( 2 , ) )
A task that polls on a trigger for max 5 seconds,
and when triggered, modifies the input array.
A task that polls on a trigger for max 5 seconds and when triggered modifies the input array .
'''
            A task that polls on a trigger for max 5 seconds,
            and when triggered, modifies the input array.
            '''
arr