It is currently April 27th, 2024, 9:39 am

help with time counter

Get help with creating, editing & fixing problems with skins
User avatar
balala
Rainmeter Sage
Posts: 16176
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: help with time counter

Post by balala »

CarlotaN wrote: February 25th, 2024, 5:19 pm Ohhh!!! Absolutely right!!! To understand I have to activate the translator and it changed Formula to Fórmula
:thumbup: Don't worry, it happens to anyone.
CarlotaN wrote: February 25th, 2024, 5:19 pm Yes, I had already done it. I had already reported it in a post, and it actually works!
CarlotaN wrote: February 25th, 2024, 5:19 pm Everything works OK!
:thumbup:
Yincognito wrote: February 25th, 2024, 5:05 pm That was in reference to this post,
CarlotaN wrote: February 25th, 2024, 5:19 pm :lol: Someone asked and I didn't know what to answer. I already had a teacher by my side and no one answered him
Now I see. I missed that post, this is why didn't make the connection.
CarlotaN wrote: February 25th, 2024, 5:19 pm Lastly, any solution to the round line time mismatch?
What does this mean? What time mismatch do you have?
User avatar
CarlotaN
Posts: 50
Joined: December 5th, 2022, 3:45 am
Location: Madrid, Spain

Re: help with time counter

Post by CarlotaN »

What does this mean? What time mismatch do you have?
Several seconds late if I don't use HA and several seconds ahead if I use HA, per minute.

If it were possible for this effect to start at 0, I imagine that the decompensation of the seconds would not be noticeable after the minutes, since the circle would not be continuous

Code: Select all

[TimeMeterBase]
Meter=Shape
Shape=Ellipse 0,0,56,56 | Fill Color 00000000 | StrokeWidth 4 | Stroke Color 2C2C2C
X=70
Y=70

[MeasureBar]
Measure=Calc
Formula=(TimeLeft % 59) / 60
Disabled=1

[MeterSeconds]
Group=Meters
Meter=Roundline
MeasureName=MeasureBar
X=r
Y=r
StartAngle=(-PI/2)
RotationAngle=(2*PI)
LineStart=54
LineLength=58
LineColor=f9932e
Solid=1
AntiAlias=1
UpdateDivider=1
Image
User avatar
balala
Rainmeter Sage
Posts: 16176
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: help with time counter

Post by balala »

CarlotaN wrote: February 25th, 2024, 7:16 pm Several seconds late if I don't use HA and several seconds ahead if I use HA, per minute.

If it were possible for this effect to start at 0, I imagine that the decompensation of the seconds would not be noticeable after the minutes, since the circle would not be continuous
I'm sorry, but I can't replicate the issue, so it's hard to say something meaningful. As said, I still believe the HA related issues are hard to be fixed. Maybe someone else has a better idea?
User avatar
CarlotaN
Posts: 50
Joined: December 5th, 2022, 3:45 am
Location: Madrid, Spain

Re: help with time counter

Post by CarlotaN »

I'm sorry, but I can't replicate the issue, so it's hard to say something meaningful. As said, I still believe the HA related issues are hard to be fixed. Maybe someone else has a better idea?
Well, it doesn't matter... Don't worry, it works pretty well as it is now. With this is enough.
Thank you infinitely!!!
Image
User avatar
balala
Rainmeter Sage
Posts: 16176
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: help with time counter

Post by balala »

CarlotaN wrote: February 25th, 2024, 8:18 pm Well, it doesn't matter... Don't worry, it works pretty well as it is now. With this is enough.
Thank you infinitely!!!
You're welcome. Glad to help.
User avatar
Yincognito
Rainmeter Sage
Posts: 7175
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: help with time counter

Post by Yincognito »

CarlotaN wrote: February 25th, 2024, 7:16 pm Several seconds late if I don't use HA and several seconds ahead if I use HA, per minute.
I think the main problem here is the awful translation from Spanish that Google produces, so let's clarify something. Is the code supposed to reach one full rotation of the roundline in less than 1 minute, or is this the "time mismatch" you were talking about?
Timer.jpg
For me, while using the code posted by balala here, the roundline completes a full circle in about 37 seconds instead of the more natural 1 minute, with or without HA (for reference, my skin displaying regular time in the upper part of the screenshot - I clicked to start the timer in your skin at 00:42:00 regular time, so that the seconds would be in sync between skins, by the way).
You do not have the required permissions to view the files attached to this post.
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth
RicardoTM
Posts: 268
Joined: December 28th, 2022, 9:30 pm
Location: México

Re: help with time counter

Post by RicardoTM »

Hola Carlota, al parecer los amigos aquí tienen problemas entendiendo la traducción de google, yo hablo español, si quieres puedes explicarme el problema en Español y yo trato de traducirlo, o si puedo, ayudarte. A mi parecer lo que te está sucediendo es que el cronómetro se está adelantando o atrasando, verdad? O sea que no cuenta el tiempo exacto que debería de contar.

Te agradecería si pudieras publicar el skin así como lo tienes ahorita, para poder probarlo. Tienes que subirlo en formato .rmsk (usando el exportador de Rainmeter como hiciste unos posts atrás).

Puede que el problema esté relacionado con el Update que estás utilizando, al final de cuentas los measures se actualizan a la velocidad del update, así que si el update es mayor a 1 segundo (1000ms), el cronómetro estaría desincronizado.

Ahora, si el problema está sólo en el roundline, es posible que tenga un updatedivider que haga que no se actualice al mismo tiempo que el measure, o que haya algún error directamente en la fórmula.
User avatar
Yincognito
Rainmeter Sage
Posts: 7175
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: help with time counter

Post by Yincognito »

Along the lines of what RicardoTM mentioned, if the answer to the question I asked in my previous reply is yes, since the value of Update in the aforementioned code is 60 milliseconds, and MeasureBar goes from around 600 to 0, the total approximate (see below why) time taken by the roundline to complete a full circle is around 36000 milliseconds, aka 36 seconds, which explains the issue and the fact that I got a full roundline circle in roughly the same amount of time.

A quick fix would be to change 599 to something like 959 and 600 to something like 960 in MeasureBar from that code, so that the values are closer to the exact 1000 skin updates required to reach 1 full minute (1 minute = 60 seconds * 1000 milliseconds = 60000 milliseconds, and since the skin Update is 60 milliseconds, it would take around 1000 skin updates to reach 1 minute).

Again, take into account that for measures that are not Time measures and that have an update frequency of less than 1 second, measuring time will NOT be precise - that is why you'd use an approximation of 1000 above, and why I recommended to do precision time measurements from the Lua script, using a function like os.clock(). Either that, or, alternatively, use a typical skin Update of 1000 and Time measures instead of Calc ones for measuring time (further computations can be done in Calc measures, of course).
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth
RicardoTM
Posts: 268
Joined: December 28th, 2022, 9:30 pm
Location: México

Re: help with time counter

Post by RicardoTM »

Yincognito wrote: February 25th, 2024, 11:56 pm Along the lines of what RicardoTM mentioned, if the answer to the question I asked in my previous reply is yes, since the value of Update in the aforementioned code is 60 milliseconds, and MeasureBar goes from around 600 to 0, the total approximate (see below why) time taken by the roundline to complete a full circle is around 36000 milliseconds, aka 36 seconds, which explains the issue and the fact that I got a full roundline circle in roughly the same amount of time.

A quick fix would be to change 599 to something like 959 and 600 to something like 960 in MeasureBar from that code, so that the values are closer to the exact 1000 skin updates required to reach 1 full minute (1 minute = 60 seconds * 1000 milliseconds = 60000 milliseconds, and since the skin Update is 60 milliseconds, it would take around 1000 skin updates to reach 1 minute).

Again, take into account that for measures that are not Time measures and that have an update frequency of less than 1 second, measuring time will NOT be precise - that is why you'd use an approximation of 1000 above, and why I recommended to do precision time measurements from the Lua script, using a function like os.clock(). Either that, or, alternatively, use a typical skin Update of 1000 and Time measures instead of Calc ones for measuring time (further computations can be done in Calc measures, of course).
Yup, I'm pretty sure the problem is the Update=60. Although I think the best approach would be to change it to 1000ms and re-adjust all formulas from there. Having it at 60 is only a waste of resources since the skin doesn't need to update every 60ms at all.

Carlota, el problema está relacionado con el Update=60 que estás utilizando. En Rainmeter, los skins se actualizan a la velocidad del Update, el Update es en milisegundos, por lo que tu skin se está actualizando una vez cada 60 milisegundos y las formulas están construidas a partir de ahí. El problema es hacer todas las conversiones para convertir 60ms a 1000ms que es un segundo, y de ahí a 60000ms que son 60 segundos o 1 minuto. Si cambias el Update a Update=1000 (1 segundo) y luego ajustas todas tus formulas a partir de ahí, no deberías tener problemas. Solo ten en cuenta que el skin se debe actualizar una vez por segundo, o sea cada 1000ms, y el roundline debe dar una vuelta completa cada 60 segundos, o sea cada 60,000ms (sesenta-mil).

Yincognito arriba te está diciendo como repararlo fácilmente, pero dejando los 60ms como base, sin embargo siento que ese método, aunque funciona, no es el mas correcto, ya que tu skin no necesita actualizarse cada 60ms, es un desperdicio de recursos y puede llevar a problemas de sincronización. De esa manera, el skin se actualizaría 1000 veces cada minuto. De la forma que yo te menciono, solo se actualizaría 60 veces cada minuto.
User avatar
CarlotaN
Posts: 50
Joined: December 5th, 2022, 3:45 am
Location: Madrid, Spain

Re: help with time counter

Post by CarlotaN »

I think the main problem here is the awful translation from Spanish that Google produces, so let's clarify something. Is the code supposed to reach one full rotation of the roundline in less than 1 minute, or is this the "time mismatch" you were talking about?
YES!!!
For me, while using the code posted by balala here, the roundline completes a full circle in about 37 seconds instead of the more natural 1 minute, with or without HA (for reference, my skin displaying regular time in the upper part of the screenshot - I clicked to start the timer in your skin at 00:42:00 regular time, so that the seconds would be in sync between skins, by the way).
For me they are 1 or 2 seconds ahead and 3 or 4 seconds behind.
Hola Carlota, al parecer los amigos aquí tienen problemas entendiendo la traducción de google, yo hablo español, si quieres puedes explicarme el problema en Español y yo trato de traducirlo, o si puedo, ayudarte. A mi parecer lo que te está sucediendo es que el cronómetro se está adelantando o atrasando, verdad? O sea que no cuenta el tiempo exacto que debería de contar.

Te agradecería si pudieras publicar el skin así como lo tienes ahorita, para poder probarlo. Tienes que subirlo en formato .rmsk (usando el exportador de Rainmeter como hiciste unos posts atrás).

Puede que el problema esté relacionado con el Update que estás utilizando, al final de cuentas los measures se actualizan a la velocidad del update, así que si el update es mayor a 1 segundo (1000ms), el cronómetro estaría desincronizado.
Adjunto el skin completo, uno que es el que Balala ha publicado, y el otro el que contiene el efecto que (de hecho es un reloj) ese no falla, yo pensaba que al reiniciar cada minuto, el fallo no se notaría al no ser una línea continua. Adjunto los 2 archivos, para que podáis probar.

Mil GRACIAS A TODOS!

PD: voy a probar las sugerencias de Yincognito, pero coged palomitas, porque no soy más que una novatísima sra mayor.
PS: I'm going to try Yincognito's suggestions, but grab some popcorn, because I'm nothing more than a newbie older lady.
You do not have the required permissions to view the files attached to this post.
Image