open-nomad/ui/app/utils/wait.js
Michael Lange 55f90cf7f7 Prototype watching resources
- Service to manage X-Nomad-Index values
- Adapter method for reloading relationships with additional params
- Pattern for watching models and model relationships using EC
2018-03-02 16:21:34 -08:00

11 lines
255 B
JavaScript

import RSVP from 'rsvp';
// An always passing promise used to throttle other promises
export default function wait(duration) {
return new RSVP.Promise(resolve => {
setTimeout(() => {
resolve(`Waited ${duration}ms`);
}, duration);
});
}