The Multi Timer provides timekeepers with the ability to manage multiple time tracking objectives, in context with their AdvoLogix workflow. The multi timer can be deployed in a variety of ways within both the desktop and mobile user experiences.
Timers are considered a prelude to formally memorializing a time entry. The multi timer allows individual timekeepers to concurrently track multiple work processes. Each timer is persistently stored in the organization's cloud data and follows the user from location to location and device to device without losing time tracking continuity. For instance, a timer can be started at the office while working from a computer browser, the same user can then leave the office, open the Salesforce mobile app and continue to work with the timers without losing continuity.
The multi timer functionality is independent from the classic Sidebar Quick Timer and the Salesforce Mobile Application Timer. If your organization is using the classic user interface, we suggest using one or the other (sidebar or multi) but not both within the same user experience.
The multi timer has an API option to pragmatically create a new timer. This allows organizations and implementation teams to create adaptable timer experiences for unique use cases. The format for the API call is as follows:
hello
i am new to blynk and have not programmed in over 20 years
i would like to set up a light timer that will come on at the same time then shut off for a few hours then turn back on then off for the night adb i would like to be able to manuel turn the light on or off if needed just unsure where to start.
i am not asking for the program to be written for me just asking for help with getting started and what i should read throu
Please take a moment to consider if this thread is worth bumping.Recommended PostsLove ZhaoyingPosted July 9, 2022Love ZhaoyingResident Neko Lion
This would seem to be a specific case of a multiplexed timer system, as outlined in the LSL Tips sticky thread at the top of this forum. One of the challenges of multiplexing is that it generally means running a fast timer whose rate is the lowest common divisor of all the periods you want the script to watch. If I understand your algorithm correctly, it would still require running the timer at the fastest rate you designate in your JSON array, but it would ease the requirement that all of the rates have a common divisor. I like that idea. I wonder only whether it will lead to accumulating small roundoff errors each time that you calculate and reset the timer. Would it be smart, say, to establish a start time -- either with llGetUnixTime or simply with llResetTime -- and periodically making an offset correction relative to it?
Setting the timer model aside, that's an interesting question in its own right. I have spent very little time with JSON in SL because I cannot see any advantage to it myself. I have the impression that JSON capability was introduced a while back to accommodate scripters who are already comfortable using it outside of SL, not because we really needed it to do anything that LSL wasn't already doing with lists.
If I understand your algorithm correctly, it would still require running the timer at the fastest rate you designate in your JSON array, but it would ease the requirement that all of the rates have a common divisor.
I've been using JSON more lately, and benefitting from the features. Single JSON "list", multiple elements per object vs. either multiple lists, or lists with multiple strides. A LOT less coding is required this way. Plus, if I want to add a "feature" it's just another named element in the JSON object.
In another project, I'm using 1 JSON heap with multiple object types keyed multiple ways to do a reverse lookup of client vs. server keys for some specific task - and it's only 6 lines of llJson() code.
"Fast" is a relative (and negotiable) definition. To my way of thinking, you should always use the slowest timer rate you can get away with, so as to reduce script time load on the region servers. So anything that is faster than it needs to be is "fast". My point was that if you have a basic multiplexed timer system that has to watch activities at 1.0, 1.3, and 1.7 second intervals, you need to design the script to trigger no slower than once every 0.1 seconds (since anything slower than that will not prompt actions at each of those intervals). I'd say that a 0.1 second timer is "fast" and almost certainly one to avoid if you can.
With your model, the script could start at the base rate of 1.0 seconds. When it triggers, it then looks at the JSON array to calculate when the next expected trigger should occur. In this case, that would be 0.3 seconds later, so you llSetTimerEvent(0.3). When that trigger occurs, repeat the exercise and llSetTimerEvent(0.4) so that the timer fires 1.7 seconds after the script started. And so on and so on. The script would still be running ":fast", but at a variable fastness and never faster than once every 0.3 seconds, which is an improvement over 0.1.
"Fast" is a relative (and negotiable) definition. To my way of thinking, you should always use the slowest timer rate you can get away with, so as to reduce script time load on the region servers. So anything that is faster that it needs to be is "fast". My point was that if you have a basic multiplexed timer system that has to watch activities at 1.0, 1.3, and 1.7 second intervals, you need to design the script to trigger no slower than once every 0.1 seconds (since anything slower than that will not prompt actions at each of those intervals). I'd say that a 0.1 second timer is "fast" and almost certainly one to avoid if you can.
But yes, I see your point and don't disagree, it's just not a concern with my current use-case. If I needed a "faster" timer, I could still use the timer "server" with just a single timer; assuming it's in the same object as the client script for relatively fast link_message() communication.
The JSON will store the client script's needed callback information. Message prefix (not shown), timer name..GUID / handle if I need one. Whatever it is, this script will send it back to the client script, so that the client script knows exactly where to pick up after the timer.
I only plan to fire when needed.
Although, if I knew and committed that all timers would be at multiples of a second, then yes. But I'd still have to track more than just the timer length for multiple active timers of different duration, to track for instance "when 7-second timer C" fired last. Otherwise, I don't know when it should fire next - unless it is the "global" timer. The "global" timer just represents the current "next to fire" (shortest time duration until next fire).
I see 2 two main drawbacks (and of course plenty of benefits): I'd have to always run time timer at 1 second, even if I only needed a single 30-second timer (unless the algorithm adjusted for that type of situation). And, I'd have to check all the timers on each fire, vs. just when the "next soonest" timer fires.
I agree. I assumed that's the sort of thing Love was proposing, and it's a great improvement over a normal multiplexed timer, which always keeps ticking away at some fast base rate. What I was pointing out is that whichever model he chooses, he doesn't need to record a starting time unless he really cares whether his timer is synced with a real clock somewhere, which is what I understood your point to be.
760c119bf3