var Clock = require("clock").Clock;
var clk=new Clock("Jun 23, 2014 12:18:02");
// every time the button is pressed, print the current time..
function doStuff() {
var d=clk.getDate();
print(d.toString());
}
That doesn't involve using setTime, so should still work fine.
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
Thanks - I'll look into this...
setTime
was added more for the F4 devices where there's a full calendar internally though.On the F103 the suggested way of keeping time is this: http://www.espruino.com/clock
That doesn't involve using setTime, so should still work fine.