I have potted together some code.
It is supposed to be a time counter of time since 'zero' (now)
I have gotten to the part where the counter is showing both the current time and the timer alternating very second or two, The icon simply paused the countdown and stopping and resetting are hopeflu additions in the future.
Here is the rmskin since there is an image and a font;
Obviously the current time is a weird side effect of the code being wrong, but when I change anything to goes back to showing the current time.
Any help is appreciated.
It is currently May 8th, 2024, 3:28 am
Tryimg to make a simple timer that resets to zero - so far: weirdness
-
- Posts: 1367
- Joined: September 7th, 2020, 2:24 pm
- Location: QLD, Australia
Tryimg to make a simple timer that resets to zero - so far: weirdness
You do not have the required permissions to view the files attached to this post.
ƈǟռ'ȶ ʄɨӼ ɨȶ ɨʄ ɨȶ ǟɨռ'ȶ ɮʀօӄɛ - ʊռʟɛֆֆ ɨȶ ɨֆ ɨռ ƈօɖɛ.
-
- Rainmeter Sage
- Posts: 16202
- Joined: October 11th, 2010, 6:27 pm
- Location: Gheorgheni, Romania
Re: Tryimg to make a simple timer that resets to zero - so far: weirdness
Help related to what? What is your question, what would you like to achieve, because for me at least it's not clear at all?
-
- Posts: 272
- Joined: December 28th, 2022, 9:30 pm
- Location: México
Re: Tryimg to make a simple timer that resets to zero - so far: weirdness
Sorry I haven't checked your code, but for time the best is to use time measures instead of counters. Check this skin in this thread
-
- Posts: 1367
- Joined: September 7th, 2020, 2:24 pm
- Location: QLD, Australia
Re: Tryimg to make a simple timer that resets to zero - so far: weirdness
Like I said, I am trying to make a timer that measures time transpired.
My code does that but it also keeps alternating between current time and time elapsed from last refresh.
O would like it to only showtime transpired.
Thanks.
ƈǟռ'ȶ ʄɨӼ ɨȶ ɨʄ ɨȶ ǟɨռ'ȶ ɮʀօӄɛ - ʊռʟɛֆֆ ɨȶ ɨֆ ɨռ ƈօɖɛ.
-
- Posts: 1367
- Joined: September 7th, 2020, 2:24 pm
- Location: QLD, Australia
Re: Tryimg to make a simple timer that resets to zero - so far: weirdness
Thanks. But that is way too complicated for my need.
It would take longer to suss out that code than to start from scratch as I have tried to do.
ƈǟռ'ȶ ʄɨӼ ɨȶ ɨʄ ɨȶ ǟɨռ'ȶ ɮʀօӄɛ - ʊռʟɛֆֆ ɨȶ ɨֆ ɨռ ƈօɖɛ.
-
- Rainmeter Sage
- Posts: 16202
- Joined: October 11th, 2010, 6:27 pm
- Location: Gheorgheni, Romania
Re: Tryimg to make a simple timer that resets to zero - so far: weirdness
But why are you complicating thing so much, in this case? I mean that if you want to get only the time transpired, use some simple measures, which are returning only the needed things. For instance:
Code: Select all
[MeasureStart]
Measure=Time
UpdateDivider=-1
[MeasureTime]
Measure=Time
Paused=1
[MeasureTimeTranspired]
Measure=Calc
Formula=( [MeasureTime:TimeStamp] - [MeasureStart:TimeStamp] )
DynamicVariables=1
If you want to get the counting starting on the refresh, you simply have to remove the Paused=1 option of the [MeasureTime] measure. And finally if you need the time gone since the refresh in a formated way, you can get it through an Uptime measure.
Isn't this a much more proper (or better, or simpler) approach?
-
- Posts: 1367
- Joined: September 7th, 2020, 2:24 pm
- Location: QLD, Australia
Re: Tryimg to make a simple timer that resets to zero - so far: weirdness
UNdterstandible simpler, but the time is not in H : M : S format just seconds.balala wrote: ↑March 1st, 2024, 4:38 pm But why are you complicating thing so much, in this case? I mean that if you want to get only the time transpired, use some simple measures, which are returning only the needed things. For instance:[MeasureTimeTranspired] return the needed information, in seconds. At refresh it starts with 0 and to get it starting you need a simple mouse action (for example), like this one: LeftMouseUpAction=[!UnpauseMeasure "MeasureStart"][!UpdateMeasure "MeasureStart"][!UnpauseMeasure "MeasureTime"][!PauseMeasure "MeasureStart"]. This way the MeasureName option of the [MeterUptime] meter should be: MeasureName=MeasureTimeTranspired.Code: Select all
[MeasureStart] Measure=Time UpdateDivider=-1 [MeasureTime] Measure=Time Paused=1 [MeasureTimeTranspired] Measure=Calc Formula=( [MeasureTime:TimeStamp] - [MeasureStart:TimeStamp] ) DynamicVariables=1
If you want to get the counting starting on the refresh, you simply have to remove the Paused=1 option of the [MeasureTime] measure. And finally if you need the time gone since the refresh in a formated way, you can get it through an Uptime measure.
Isn't this a much more proper (or better, or simpler) approach?
ƈǟռ'ȶ ʄɨӼ ɨȶ ɨʄ ɨȶ ǟɨռ'ȶ ɮʀօӄɛ - ʊռʟɛֆֆ ɨȶ ɨֆ ɨռ ƈօɖɛ.
-
- Rainmeter Sage
- Posts: 16202
- Joined: October 11th, 2010, 6:27 pm
- Location: Gheorgheni, Romania
Re: Tryimg to make a simple timer that resets to zero - so far: weirdness
Yep, but this is why sis I say you can use a Uptime measure, to get it formatted. For instance:
Code: Select all
[MeasureTimeTranspiredForm]
Measure=Uptime
Format=%3!02i! : %2!02i! : %1!02i!
SecondsValue=[MeasureTimeTranspired]
DynamicVariables=1
-
- Posts: 1367
- Joined: September 7th, 2020, 2:24 pm
- Location: QLD, Australia
Re: Tryimg to make a simple timer that resets to zero - so far: weirdness
Thanks for that. I am a stereotypical overcomplicatidist.
Gracias, abrigado, origato, much appreciated.
Gracias, abrigado, origato, much appreciated.
ƈǟռ'ȶ ʄɨӼ ɨȶ ɨʄ ɨȶ ǟɨռ'ȶ ɮʀօӄɛ - ʊռʟɛֆֆ ɨȶ ɨֆ ɨռ ƈօɖɛ.
-
- Rainmeter Sage
- Posts: 16202
- Joined: October 11th, 2010, 6:27 pm
- Location: Gheorgheni, Romania
Re: Tryimg to make a simple timer that resets to zero - so far: weirdness
Great! And don't be, at least when possible.