Setting test execution time limit on Linux/non-macOS platforms

Currently with Xcode it is possible to set time limit for test with executionTimeAllowance or passing -maximum-test-execution-time-allowance to xcodebuild. Is there any such alternatives on Linux?
How can I set time limit for each test on Linux?