It is currently March 28th, 2024, 5:39 pm

Time Synchronization

Get help with creating, editing & fixing problems with skins
Post Reply
User avatar
brax64
Posts: 172
Joined: July 8th, 2018, 8:05 pm

Time Synchronization

Post by brax64 »

Hello everybody!
I've this "band clock" working fine as it is...

Code: Select all

[Rainmeter]
Author=brax64
AccurateText=1
Update=250

[Variables]

@Include=#@#/Variables.inc

[Time]
Measure=Time

[Mask1]
Meter=Shape
Shape=Ellipse 205,205,100,100 | StrokeWidth 2| Stroke Color 255,255,255,255 |Fill Color 0,0,0,1

[SecondsBand]
Meter=Roundline
MeasureName=time
X=205
Y=205
LineLength=102
LineColor=0,0,0,255
LineWidth=1
AntiAlias=1
StartAngle=4.7123889
RotationAngle=6.2831853
Solid=1
ValueRemainder=60
UpdateDivider=4

[MinBand]
Meter=Roundline
MeasureName=Time
X=205
Y=205
LineLength=93
LineColor=170,250,250,255
LineWidth=4
AntiAlias=1
StartAngle=4.7123889
RotationAngle=6.2831853
Solid=1
ValueRemainder=3600
UpdateDivider=10

[Mask2]
Meter=Shape
Shape=Ellipse 205,205,85,85 |Fill Color 0,0,0 | Stroke Color 0,0,0,0

[HourBand]
Meter=Roundline
MeasureName=Time
X=205
Y=205
LineLength=85
LineColor=90,170,170,255
LineWidth=6
AntiAlias=1
StartAngle=4.7123889
RotationAngle=6.2831853
Solid=1
ValueRemainder=43200
UpdateDivider=20

[Mask3]
Meter=Shape
Shape=Ellipse 205,205,77,77 |Fill Color 0,0,0 | Stroke Color 0,0,0,0
I want it to work differently tho... right now the minutes and hours bands keep moving constantly following the "UpdateDivider" set for each one. I want instead to move the minutes/hours bands only at the exact minute and exact hour (so the minute band will move at the next position when seconds=00 and the hour band will advance when minutes=00).
Did try changing the UpdateDivider value (250x4x60 for the minutes band and 250x4x3600 for the hour band) it kinda works but is not in synch with the real time, in detail the minutes band will move after 60 sec from when the skin is loaded or refreshed and it's not necessarily at the real time sec=00, same apply to the hours band...also did notice, respect to the system clock, that afer the skin is loaded the time is not perfect, always behind 1 to 2 seconds, after refreshing once or twice it gets in synch with the system time...
Any idea how to solve these problems?
User avatar
jsmorley
Developer
Posts: 22628
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Time Synchronization

Post by jsmorley »

User avatar
brax64
Posts: 172
Joined: July 8th, 2018, 8:05 pm

Re: Time Synchronization

Post by brax64 »

Thank you jsmorley!
That fix the minute band, what about the hour band? May I use (Time % 3600)=0 ?
Post Reply