Creates a promise which resolve after a specified delay