let promise wait a couple of seconds before return
问题 I'm having a function returning a promise. In this function, we call a third party vender to send some push notification through their server. it looks like apiGetLoggedInUser.then( user => { return sendMessage(user.name); } ) However the thing is we decided to wait for 3 seconds before we really call this sendMessage function. However we'd prefer not to change sendMessage since it's provided. I'm wondering how to really do the "wait" part in this scenario since promise is used to remove