It is currently March 28th, 2024, 4:33 pm

Help me create a "different" clock

Get help with creating, editing & fixing problems with skins
User avatar
jsmorley
Developer
Posts: 22628
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Help me create a "different" clock

Post by jsmorley »

eclectic-tech wrote:Yeah, I use that all the TIME ;-)

Can you offer me an alternate approach?
Guess I don't understand. Formula is not a supported option in a Time measure.
User avatar
jsmorley
Developer
Posts: 22628
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Help me create a "different" clock

Post by jsmorley »

I would get the difference in seconds between two times like this:

Code: Select all

[Rainmeter]
Update=1000
AccurateText=1
DynamicWindowSize=1

[MeasureThen]
Measure=Time
UpdateDivider=-1

[MeasureNow]
Measure=Time

[MeasureDiff]
Measure=Calc
Formula=[MeasureNow:timestamp] - [MeasureThen:timestamp]
DynamicVariables=1

[MeterDiff]
Meter=String
MeasureName=MeasureDiff
FontSize=11
FontWeight=400
FontColor=255,255,255,255
SolidColor=47,47,47,255
Padding=5,5,5,5
AntiAlias=1
User avatar
eclectic-tech
Rainmeter Sage
Posts: 5382
Joined: April 12th, 2012, 9:40 pm
Location: Cedar Point, Ohio, USA
Contact:

Re: Help me create a "different" clock

Post by eclectic-tech »

'Timestamp' is a simple concept (time in seconds), but the implementation has always puzzled me a bit :???:

I have used Formula in many time measures to return the timestamp value and it works; back in the day before the string measure was introduced, I remember the time measure was used for some very creative text solutions...

However, I agree that your method is preferred.
I modified the package and code in my previous post to reflect timestamp calculations.

Thanks, but I will probably still find myself using Formula in Time measures (old habits are hard to break ;-) ).
User avatar
jsmorley
Developer
Posts: 22628
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Help me create a "different" clock

Post by jsmorley »

eclectic-tech wrote:'Timestamp' is a simple concept (time in seconds), but the implementation has always puzzled me a bit :???:

I have used Formula in many time measures to return the timestamp value and it works; back in the day before the string measure was introduced, I remember the time measure was used for some very creative text solutions...

However, I agree that your method is preferred.
I modified the package and code in my previous post to reflect timestamp calculations.

Thanks, but I will probably still find myself using Formula in Time measures (old habits are hard to break ;-) ).
But formula is ignored in a Time measure... :confused:
User avatar
eclectic-tech
Rainmeter Sage
Posts: 5382
Joined: April 12th, 2012, 9:40 pm
Location: Cedar Point, Ohio, USA
Contact:

Re: Help me create a "different" clock

Post by eclectic-tech »

jsmorley wrote:But formula is ignored in a Time measure... :confused:
They may be ignored, but they work... :???:
User avatar
jsmorley
Developer
Posts: 22628
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Help me create a "different" clock

Post by jsmorley »

eclectic-tech wrote:They may be ignored, but they work... :???:
Uhm, No they don't.. ;-)

Format=((%H * 3600) + %S) will return a string of "((13 * 3600) + 23)" which can be used in a Formula elsewhere, but Formula is just not allowed on a Time measure.
h3103
Posts: 12
Joined: January 20th, 2018, 10:00 am

Re: Help me create a "different" clock

Post by h3103 »

Thanks first oft all, this is a Huge amount of help for me... But it still isn't quite what i need. I need the clock to be able to Start off of one point in time i give to it and it runnig forever without me restarting it everytime my computer boots.
User avatar
balala
Rainmeter Sage
Posts: 16110
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Help me create a "different" clock

Post by balala »

h3103 wrote:But it still isn't quite what i need. I need the clock to be able to Start off of one point in time i give to it and it runnig forever without me restarting it everytime my computer boots.
You would like to have it stopped initially, then once started, it should have to work forever? Even after you restart the computer?
If so, that's a weird idea. Don't say it would be impossible, but it's weird...
User avatar
jsmorley
Developer
Posts: 22628
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Help me create a "different" clock

Post by jsmorley »

h3103 wrote:Thanks first oft all, this is a Huge amount of help for me... But it still isn't quite what i need. I need the clock to be able to Start off of one point in time i give to it and it runnig forever without me restarting it everytime my computer boots.

Code: Select all

[Rainmeter]
Update=1000
AccurateText=1
DynamicWindowSize=1

[Variables]
Target=1/20/2017 12:00:00

[MeasureTarget]
Measure=Time
TimeStamp=#Target#
TimeStampFormat=%#m/%#d/%Y %#H:%M:%S
UpdateDivider=-1

[MeasureNow]
Measure=Time

[MeasureDiff]
Measure=Calc
Formula=[MeasureNow:timestamp] - [MeasureTarget:timestamp]
DynamicVariables=1

[MeasureFormatSeconds]
Measure=Uptime
SecondsValue=[MeasureDiff]
Format="%4!i!d %3!i!h %2!i!m %1!i!s"
DynamicVariables=1

[MeterFormatDifference]
Meter=String
MeasureName=MeasureFormatSeconds
FontSize=11
FontWeight=400
FontColor=255,255,255,255
SolidColor=47,47,47,255
Padding=5,5,5,5
AntiAlias=1
1.png
https://docs.rainmeter.net/manual/measures/time/#TimeStamp
https://docs.rainmeter.net/manual/measures/time/#TimeStampFormat

https://docs.rainmeter.net/manual/measures/uptime/#SecondsValue

That will survive a reboot...
User avatar
eclectic-tech
Rainmeter Sage
Posts: 5382
Joined: April 12th, 2012, 9:40 pm
Location: Cedar Point, Ohio, USA
Contact:

Re: Help me create a "different" clock

Post by eclectic-tech »

jsmorley wrote:Uhm, No they don't.. ;-)

Format=((%H * 3600) + %S) will return a string of "((13 * 3600) + 23)" which can be used in a Formula elsewhere, but Formula is just not allowed on a Time measure.
Yea, you are right! I was using the timestamp all the time and thought my formulas were doing something...

Thanks for setting me straight AGAIN! :D
Post Reply