Calling checkTest() function in an infinite loop in a separate thread. The loop runs at 1 hz