docs: use await

This commit is contained in:
Nebel 2019-10-13 02:32:03 +09:00 committed by GitHub
parent aab3397bf9
commit 5842775133
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -14,7 +14,7 @@ async function main() {
await port.export("out");
for (;;) {
port.write(value);
await port.write(value);
await new Promise(resolve => setTimeout(resolve, 1e3));
}
}