open-nomad/ui/app/utils/wait.js

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

11 lines
257 B
JavaScript
Raw Normal View History

import RSVP from 'rsvp';
// An always passing promise used to throttle other promises
export default function wait(duration) {
2021-12-28 14:45:20 +00:00
return new RSVP.Promise((resolve) => {
setTimeout(() => {
resolve(`Waited ${duration}ms`);
}, duration);
});
}