Skip to content

Instantly share code, notes, and snippets.

@fvdm fvdm/busy.js
Last active Jan 14, 2017

Embed
What would you like to do?
function busy (ms) {
var arr = '|/―\\', i = 0;
setInterval (function() {
i = !arr[i] ? 0 : i;
process.stdout.write ('\r' + arr[i] + ' ');
i++;
}, ms);
}
busy (90);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.