only vibrate during work hours

pull/2138/head
Spencer Churchill 2022-09-22 15:29:59 -07:00
parent 2abad628ec
commit a1e6bae39f
1 changed files with 8 additions and 4 deletions

View File

@ -7,9 +7,13 @@ they don't interfere with currently-running apps */
const look = 20 * 1000; // 20 seconds const look = 20 * 1000; // 20 seconds
buzz = _ => { buzz = _ => {
const d = new Date();
// run from 8 AM - 5 PM
if (d >= 8 && d <= 17) {
Bangle.buzz().then(_ => { Bangle.buzz().then(_ => {
setTimeout(Bangle.buzz, look); setTimeout(Bangle.buzz, look);
}); });
}
}; };
// add widget // add widget