function async_wait(ms) {
    return new Promise((resolve) => setTimeout(resolve, ms));
}
Returns a Promise which is resolved after the given number of milliseconds.

@param {Number} ms
@returns {Promise<void>}