It is currently September 8th, 2024, 2:46 am

Uptime

Get help with creating, editing & fixing problems with skins
pashashocky
Posts: 5
Joined: July 5th, 2010, 8:32 pm

Uptime

Post by pashashocky »

A long time ago, I remember, you used to be able to measure uptime...

Could anyone please remind me of a correct way to do this

Thanks, pash.

Ps. i know that its something to do with Uptime... would it look like this?

Code: Select all

[Measure]
Measure=Uptime

[Uptime]
Meter=STRING
MeterStyle=StyleUptime
MeasureName=Measure

[StyleUptime]
......
[img]http://img96.imageshack.us/img96/6144/jokeryo.png[/img]
poiru
Developer
Posts: 2873
Joined: April 17th, 2009, 12:18 pm

Re: Uptime

Post by poiru »

pashashocky wrote:

Code: Select all

[Measure]
Measure=Uptime

[Uptime]
Meter=STRING
MeterStyle=StyleUptime
MeasureName=Measure

[StyleUptime]
......
Yes, that would work.
pashashocky
Posts: 5
Joined: July 5th, 2010, 8:32 pm

Re: Uptime

Post by pashashocky »

Could you please help me out with the Format for the Uptime Measure...

I want to set it to Hours Mins Sec

Thanks....

For some reason this doesnt work.

Code: Select all

[MeasureUptime]
Measure=Uptime
Format="%H.%M.%S"

-Pash
[img]http://img96.imageshack.us/img96/6144/jokeryo.png[/img]
poiru
Developer
Posts: 2873
Joined: April 17th, 2009, 12:18 pm

Re: Uptime

Post by poiru »

Try:

Code: Select all

Format="%3!02i!:%2!02i!:%1!02i!"
pashashocky
Posts: 5
Joined: July 5th, 2010, 8:32 pm

Re: Uptime

Post by pashashocky »

YOU ARE A GENIOUS :P

Do you mind explaining what the bangs and the numbers mean?

here is what came out ;)



-pash

BTW. are you by any chance good with ls?
[img]http://img96.imageshack.us/img96/6144/jokeryo.png[/img]
User avatar
maminscris
Posts: 509
Joined: April 24th, 2009, 3:17 pm
Location: Bucharest, Romania Lat 44,43° Lon 26,1°

Re: Uptime

Post by maminscris »

pashashocky wrote:
Do you mind explaining what the bangs and the numbers mean?
http://forum.rainmeter.net/viewtopic.php?f=5&t=788&p=8984#p5754
Zero at programing, zero at writing codes, so far 2 at making images
But I'm good at copy/paste, and I not always like this
Image
pashashocky
Posts: 5
Joined: July 5th, 2010, 8:32 pm

Re: Uptime

Post by pashashocky »

yeah i know about

Code: Select all

substitute
and

Code: Select all

postfix
but what i really needed is format :P

This is what really helped me :)
I find that Format looks cleaner in the code than Substitute. And it's much simpler to use

Code:
[MeasureUptime]
Measure=UPTIME
Format="%4!i! Days, %3!i! Hours, %2!i! Minutes"


This would give "3 Days, 5 Hours, 53 Minutes"
%4 Gives the Days
%3 Gives Hours
%2 Gives Minutes
And, if you really want, you can show seconds with %1

!i! Will just show the number as is -- 1,2,3...,14,15,16
You can replace that with !02! which will automatically append a zero in front of single digit numbers -- 01,02,03...14,15,16

And you can change Days to D or whatever you want it to say. Take out the commas if you want. It's much easier in my mind than using substitute.
I guess this is not the place to find experts in Litestep, but still is there anyone who could help out?

-Pash
[img]http://img96.imageshack.us/img96/6144/jokeryo.png[/img]
User avatar
J0YU
Posts: 4
Joined: July 4th, 2010, 10:54 am

Re: Uptime

Post by J0YU »

I find that Format looks cleaner in the code than Substitute. And it's much simpler to use

Code:
[MeasureUptime]
Measure=UPTIME
Format="%4!i! Days, %3!i! Hours, %2!i! Minutes"


This would give "3 Days, 5 Hours, 53 Minutes"
%4 Gives the Days
%3 Gives Hours
%2 Gives Minutes
And, if you really want, you can show seconds with %1

!i! Will just show the number as is -- 1,2,3...,14,15,16
You can replace that with !02! which will automatically append a zero in front of single digit numbers -- 01,02,03...14,15,16

And you can change Days to D or whatever you want it to say. Take out the commas if you want
. It's much easier in my mind than using substitute.
I think the highlighted part deserves to be in the Full Manual for Rainmeter
User avatar
jsmorley
Developer
Posts: 22715
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Uptime

Post by jsmorley »

J0YU wrote: I think the highlighted part deserves to be in the Full Manual for Rainmeter
I think it is pretty clear, and the example already has something similar.

http://rainmeter.net/cms/Measures-UpTime_beta