mirror of https://github.com/espruino/BangleApps
only vibrate during work hours
parent
2abad628ec
commit
a1e6bae39f
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue