You can create a new Promise that resolves after a certain delay using setTimeout(). If the Promise doesn't resolve within the specified timeout, you can reject it.
setTimeout()