timeout

Returns a new promise that will reject with an error after a specified timeout.

Example