tinytest: support timeout on Windows (cherry picked from commit 8d5c5650d281019832fa7b5133b85c7ad29f664e)