The dateurl is a url of a page that returns a string containing the current date (modified to correct for the time zone issue), and I believe that is working correctly, since I have the same code using the same URL on my desk light, where it gets the time successfully (Espruino Board 1v3 with v80 (ie, post v80 release, new numbering system) bigram).
The reason I use safeGetTime() is that if the initial request to get the date fails, I don't want every call to getMirrorString() to fail, since it could still be recording information, and if it gets back -1 for the current time, and then subtracts a bunch from it, it's still okay.
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.
clk comes from here, which is called during initialization - it's just a clock object set to the current time.
I was getting this behavior with the latest cutting edge build - forgot to mention this in original post.
The dateurl is a url of a page that returns a string containing the current date (modified to correct for the time zone issue), and I believe that is working correctly, since I have the same code using the same URL on my desk light, where it gets the time successfully (Espruino Board 1v3 with v80 (ie, post v80 release, new numbering system) bigram).
The reason I use safeGetTime() is that if the initial request to get the date fails, I don't want every call to getMirrorString() to fail, since it could still be recording information, and if it gets back -1 for the current time, and then subtracts a bunch from it, it's still okay.
The code being run is https://github.com/SpenceKonde/AzzyProjects/edit/master/VoiceController.js - except I forgot to click sync last night so the version in github is from before I fixed the syntax errors. x_x