On Saturday, July 18, 2020 at 3:47:49 AM UTC-7, Mat wrote: > > This is a naive question but I have to ask (in reference to this > <https://groups.google.com/forum/#!topic/tiddlywikidev/tkT1OjIPJd4> > thread): If one has a wiki with your plugin on a server like github... > would that mean it can execute stuff automatically? For example, if the > timer was used to trigger a download of stuff... would that mean that the > fetching process can finish without human intervention so that when the > human logs in and opens his gh hosted webpage, it is loaded with the > goodies? I assume this would not work, right? (to name one unclarity: how > would it save?) > What if the wiki is left open/active day in and day out could it do it then > without human intervention? > Basically; must a wiki be loaded in the browser for it to do anything? >
The timer doesn't actually do anything without a user action. It simply saves a "startime" (<<now YYYY0MM0DD0hh0mm0ss0XXX>>) when you press the "start" button, and saves the "stoptime" when you press the "stop" button. Then it does some math to figure out the difference in minutes and seconds and saves that into the tiddler as "elapsedtime" and adds it to any previous "totaltime" to keep a running total. To update the elapsed time without user intervention would require use of javascript setTimeout() or setInterval(...) to create an interrupt-driven event that would be triggered once a second (as long as the wiki is loaded) and write the elapsed time into the tiddler. Updating the tiddler contents would then cause a TWCore refresh, so you could display the current elapsed time. I did something like this in TWClassic (see http://tiddlytools.com/#TaskTimerPlugin). But the new timer doesn't do any javascript at all... it's purely wikitext. There's nothing that happens in between browser sessions. The only possible "cross-session" processing would be if you were to "start" a timer and then save the file. Then, when you reload later, you could "stop" the timer and it would calculate the difference to get the elapsed time. -e -- You received this message because you are subscribed to the Google Groups "TiddlyWiki" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/95dd4e3f-a794-4095-bed9-822d236b3505o%40googlegroups.com.

