auto fade out

This commit is contained in:
Chris Ham
2018-10-27 09:50:05 -07:00
parent 886a5f8b27
commit f3a4159823
5 changed files with 160 additions and 17 deletions

View File

@@ -48,4 +48,13 @@ exports.average = function(e) {
return avg;
};
exports.randSort = () => { return 0.5 - Math.random() };
exports.randSort = () => { return 0.5 - Math.random() };
exports.sleep = (milliseconds) => {
var start = new Date().getTime();
for (var i = 0; i < 1e7; i++) {
if ((new Date().getTime() - start) > milliseconds){
break;
}
}
}