This won't help at all with the original request to have it fire "on demand" though.
True, but the only reason I though of implementing a fire "on demand" was
the "big" 300s UpdateRate. Sometimes one would want to see the "latency" as of "right now", instead of waiting 5 minutes for it to update. But
I want to keep that 300s UpdateRate though!
On the other hand, having the UpdateRate set to 32s would make fire "on demand" quite irrelevant (therefore not going to be implemented), as the measure would update every 32s (a
"small" interval) anyway.
The way I want to make this work is:
- a "big" "default" update of the
measure (e.g. 300s)
- a possibility to "trigger" a "right now" update
of the measure anytime.
Basically I want rare default pings, but with the ability of a "right now" manual mode (whether it's mouse click, mouse hover, etc.)
To be clear, it's not counting "UpdateRate" in the plugin, but an entirely invisible to you "counter" in the plugin that is incremented by 1 on each update.
I think I understand it now. The "counter" basically increments each second, right? And that "reset" can be implemented on each "update
of the counter" (
not the measure) - so actually the "reset" to 0 is possible each second (?).
You see, using the same word : "update" for both the measure and the "counter" - that's what created the confusion. But I guess it's settled now. As I said before, "resetting" the "counter" to 0 is useless given the fact that
the measure updates every 32s anyway.
What triggered my questions in the first place was why setting the UpdateRate to 32? Wouldn't the "reset" be possible using a code like this?
Code: Select all
[MeasurePing]
Measure=Plugin
Plugin=PingPlugin
DestAddress=www.google.com
UpdateRate=300
[MeterPing]
Meter=String
MeasureName=MeasurePing
X=5
Y=5
W=200
H=20
FontColor=255,255,255,255
SolidColor=0,0,0,1
Text=google.com: %1ms
LeftMouseUpAction=[!SetOption MeasurePing UpdateRate 0][!UpdateMeasure MeasurePing][!SetOption MeasurePing UpdateRate 300]
I hope I'm not such a pain in the a$$ with this, but I feel I'm missing something, and I really want to understand how this can be done.