*Jomin wipes the muck off of her arms as she takes a short break from the delicate work that she is performing deep in the bowels of the Mudlet codebase to rebuild it better, stronger, simpler... you get the gist! *
Humm, let me see, ah, good you are not trying to use the stopwatches - there is something decidedly unsatisfactory with those things that may need a large hammer to fix!
Right using
permTimer( "name", "parent", timeout {in milli-seconds}, "function" ) will set up a Permanent (appears in the editor) with the given "name" inside the "parent" folder if one is set - seems to allocate one called "a" if an empty string is given, which will call the Lua "function" every time out interval once it is enabled - it is NOT enabled at this point.
The "permTimer" Lua function will return a single (positive) Id number that identifies the timer although I am not sure that is of much use except when looking at the Mudlet central error console or the error screen in the Editor for the profile. Having got a positive number (a -1 indicates an error) that name can then be used with:
enableTimer( "name" ) and
disableTimer( "name" ) to start and stop it, respectively, from calling the "function" every elapsed "timeout" - the Wiki pages seem to suggest that the Id numbers can be used to specify a timer for these functions but the C++ code I am currently gazing at does not seem to be set up to accept Id numbers, only names.
For the record there is also the
tempTimer( timeout, function ) which creates a one-shot (fires and then deletes itself) timer in the same manner. Importantly it IS automatically started when it is created - which is just as well given that I'm not convinced that the enable/disable commands will work on temporary ones...
Furthermore I can see that there does not appear to be a way to adjust the time-out on an existing timer - which seems a bit of an oversight if one wants to have a permanent tick timer that can be "trimmed" to make it act as a Phase-Locked-Loop that uses "on-tick" messages to bring it into sync with the Server. {I am an Electrical and Electronics Engineer in Real-Life™} - so you will have to delete the timer {with
killTimer( something ) - but that says it only takes an Id of a tempTimer as a string argument but Ids are numbers - so that doesn't sound right either

}.
Okay - that is something
else to go onto the towering pile that is my to-do list...
Accepted Jomin
{a.k.a. SlySven - one of the small band of Mudlet-makers(coders)}