Postman has a setting that you set manually in Settings > General > Request timeout in ms that you can set if you want to set an explicit timeout. However, you won’t be able to do what you’re trying to do from a script.
You can, however, write request tests to make sure your response times are under a certain threshold. That way when you run the request, the test will fail if it’s slower than say, 800ms:
pm.test("Response time is less than 800ms", function () {
pm.expect(pm.response.responseTime).to.be.below(800);
});