@socketsupply/socket
Version:
A Cross-Platform, Native Runtime for Desktop and Mobile Apps — Create apps using HTML, CSS, and JavaScript. Written from the ground up to be small and maintainable.
17 lines (13 loc) • 380 B
JavaScript
import { setImmediate, setTimeout } from './promises.js'
import platform from './platform.js'
export async function wait (delay, options = null) {
return await setTimeout(delay, undefined, options)
}
export async function postTask (callback, options = null) {
return await platform.postTask(callback, options)
}
export default {
postTask,
yield: setImmediate,
wait
}