It is currently October 14th, 2024, 10:01 pm

Simple countdown timer

Get help with creating, editing & fixing problems with skins
User avatar
Yincognito
Rainmeter Sage
Posts: 8465
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: Simple countdown timer

Post by Yincognito »

jsmorley wrote: August 5th, 2021, 5:21 pm Keep in mind that ellipses are defined from the center out, not from the left as most other things are.

https://docs.rainmeter.net/manual/meters/shape/#Ellipse
Ah, now I see: that's why people use rounded rectangles instead of ellipses... O.O
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth
User avatar
jsmorley
Developer
Posts: 22856
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Simple countdown timer

Post by jsmorley »

Yincognito wrote: August 5th, 2021, 5:24 pm Ah, now I see: that's why people use rounded rectangles instead of ellipses... O.O
In classical geometry, a radius of a circle or sphere is any of the line segments from its center to its perimeter, and in more modern usage, it is also their length. The name comes from the Latin radius, meaning ray but also the spoke of a chariot wheel.
User avatar
Yincognito
Rainmeter Sage
Posts: 8465
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: Simple countdown timer

Post by Yincognito »

jsmorley wrote: August 5th, 2021, 5:28 pm
Of course, I couldn't agree more - it's natural for an ellipse to start from the center out. My point was the lengths folks go to avoid a simple subtraction of the radius from X or Y. If that is the reason for them preferring rounded rectangles, that is, apart from copy pasting similar techniques or using code that already approaches this a certain way.

I guess in the end it's a matter of preference, neither way is invalid...
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth
User avatar
death.crafter
Rainmeter Sage
Posts: 1398
Joined: April 24th, 2021, 8:13 pm

Re: Simple countdown timer

Post by death.crafter »

307th Post

Inspired by sl23, I made my own Timerclock.

But I wouldn't release it formally since it is more or less modified sl23 timer.

Sorry that was faulty.
Here is the new one:
Timerlarm_v1.0.0.rmskin
You do not have the required permissions to view the files attached to this post.
Last edited by death.crafter on August 7th, 2021, 5:31 pm, edited 1 time in total.
from the Realm of Death
User avatar
Yincognito
Rainmeter Sage
Posts: 8465
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: Simple countdown timer

Post by Yincognito »

death.crafter wrote: August 7th, 2021, 5:07 pm 307th Post

Inspired by sl23, I made my own Timerclock.

But I wouldn't release it formally since it is more or less modified sl23 timer.

Here it is:
Timerlarm_v1.0.0.rmskin
I will add a stopwatch/timer to my skin suite as well, thanks to this thread. I don't know if I'll use this code though, it depends on whether I will display milliseconds or not. But yeah, this gave us some ideas indeed... :D
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth
User avatar
death.crafter
Rainmeter Sage
Posts: 1398
Joined: April 24th, 2021, 8:13 pm

Re: Simple countdown timer

Post by death.crafter »

Yincognito wrote: August 7th, 2021, 5:16 pm I will add a stopwatch/timer to my skin suite as well, thanks to this thread. I don't know if I'll use this code though, it depends on whether I will display milliseconds or not. But yeah, this gave us some ideas indeed... :D
Milliseconds lol. I mean you can but that would take a high update rate.
Btw, I updated the CustomContextMenu to be more dynamic. I will update the docs in the mean time. You can see it in this skin.
from the Realm of Death
User avatar
jsmorley
Developer
Posts: 22856
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Simple countdown timer

Post by jsmorley »

Displaying milliseconds in any kind of "real time" way, even if possible, which it isn't, would likely cause Rainmeter to either just entirely lock up, or your CPU to just burst into flames.
User avatar
Yincognito
Rainmeter Sage
Posts: 8465
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: Simple countdown timer

Post by Yincognito »

death.crafter wrote: August 7th, 2021, 5:34 pm Milliseconds lol. I mean you can but that would take a high update rate.
Btw, I updated the CustomContextMenu to be more dynamic. I will update the docs in the mean time. You can see it in this skin.
Yeah, I know - hence the "whether" part. For a stopwatch, milliseconds can be important, but I will decide based on performance as well - I would try to avoid having another 25 ms updated skin in my suite, obviously, even though the idea is to toggle to the stopwatch/timer on demand only, and just didplay the 1s updated time/clock otherwise.

Nice to hear about the updated CustomContextMenu. ;-) Still doesn't work to place the menu upwards when the skin is at the bottom of the screen though...
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth
User avatar
Yincognito
Rainmeter Sage
Posts: 8465
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: Simple countdown timer

Post by Yincognito »

jsmorley wrote: August 7th, 2021, 5:41 pm Displaying milliseconds in any kind of "real time" way, even if possible, which it isn't, would likely cause Rainmeter to either just entirely lock up, or your CPU to just burst into flames.
Yeah, I didn't mean to display ALL the ms from 0 to 999 (I'm not that crazy, LMAO), but rather just 40 times a second using an update or wait time of 25 ms (could be 50 ms if the performance impact is too much). I've done this already in my visualiser, where I display RMS values once every 50 ms, the only question is how it will affect a suite that already has other 4 skin running at that update rate.

Out of curiosity, Lua provides the ms, or not? Cause the Rainmeter's Time measures surely can't.
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth
User avatar
jsmorley
Developer
Posts: 22856
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Simple countdown timer

Post by jsmorley »

Yincognito wrote: August 7th, 2021, 5:56 pm Yeah, I didn't mean to display ALL the ms from 0 to 999 (I'm not that crazy, LMAO), but rather just 40 times a second using an update or wait time of 25 ms (could be 50 ms if the performance impact is too much). I've done this already in my visualiser, where I display RMS values once every 50 ms, the only question is how it will affect a suite that already has other 4 skin running at that update rate.

Out of curiosity, Lua provides the ms, or not? Cause the Rainmeter's Time measures surely can't.
No, the time functions in Lua don't do milliseconds either.