It is currently March 29th, 2024, 6:48 am

documentation: Update

Discussions about the documentation, main Rainmeter site and forums.
User avatar
moshi
Posts: 1740
Joined: November 13th, 2012, 9:53 pm

documentation: Update

Post by moshi »

i just learned that Update is actually independent of the system time.

so, if your computer is very busy an update might take longer than it should. (was just trying to build a stopwatch with independent counters and while watching a video i noticed it slowed down, working with timestamps now).

maybe this should get a short mention in the docs.
User avatar
jsmorley
Developer
Posts: 22628
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: documentation: Update

Post by jsmorley »

That is correct. The Update setting has nothing to do with the system "time" as such, but just says "update every xxxx milliseconds".

If the entirety of the non-threaded actions take longer than xxxx milliseconds, as you say, a busy computer might be one reason, you sometimes get in effect a "skipped" update, (the update happens, but it might be one "Update" later) so one should never depend on Update for anything that drives a clock or other timed events.

The built-in "Counter" function is at once effected and not affected, as it simply keeps track of "updates", not elapsed time. So a counter that counts from 1 to 100 will always return each value, but it might take longer than (100 X Update) in elapsed time to do so.

[MeasureCounter]
Measure=Calc
Formula=Counter % 100

Counters that are user-defined by an increment to a Calc measure may have the same result.

[MeasureMyCounter]
Measure=Calc
Formula=(MeasureMyCounter % 100) + 1

This is one of the reasons (along with the heavy resource usage) why animations are hard to perfect in this environment.

I did add a short note to the docs. http://docs.rainmeter.net/manual/skins/rainmeter-section#Update