1
0
mirror of https://github.com/matrix-org/matrix-js-sdk.git synced 2025-11-25 05:23:13 +03:00

Stop using Bluebird.delay and Bluebird promise::delay

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
Michael Telatynski
2019-11-21 10:05:59 +00:00
parent 2ce106382a
commit 549b0f9313
4 changed files with 12 additions and 4 deletions

View File

@@ -708,3 +708,8 @@ module.exports.ensureNoTrailingSlash = function(url) {
return url;
}
};
// Returns a promise which resolves with a given value after the given number of ms
module.exports.sleep = (ms, value) => new Promise((resolve => {
setTimeout(resolve, ms, value);
}));