Creates a promise which resolves after a specified delay