Uptime measure
Measure=Uptime
measures the time since the last restart of the computer.
The string value of the measure is defined by the Format option. The number value will be the amount of time since the last restart in seconds.
Options
- General measure options
- All general measure options are valid.
Format
Default:%4!i!d %3!i!:%2!02i!
-
Format of the measure value. This can be a combination of text and the following codes:
%4
: Days.%3
: Hours.%2
: Minutes.%1
: Seconds.
!i!
: Putting this after the format code shows the numbers with no leading zeros.!02i!
: Putting this after the format code shows the numbers with leading zeros.
The number following the0
, as in!02i!
above, defines the total length you want for the value, padded with zeros as needed to achieve the length.
AddDaysToHours
Default:1
-
If set to
1
and if%4
(days) is not used in theFormat
option,%3
(hours) is incremented by days * 24. Set to0
to disable this behaviour. SecondsValue
-
This will override the default behavior of the measure. Instead of measuring the time since the last restart of the system, this option will define a number of seconds. The Format option can then be used to format that number of seconds to days, hours, minutes and/or seconds as desired.
An example might be:
[MeasureFormatSeconds]
Measure=UpTime
SecondsValue=[SomeMeasureName]
Format="%4!i!d %3!i!h %2!i!m %1!i!s"
DynamicVariables=1
Example
[Rainmeter] |
Note for Windows 10
Starting with Windows 8, the standard "shut down" functionality now does a "hybrid shut down", in order to make the system start much faster when you start it up again. What this does is "hibernate" the system / kernel part of Windows, and shut down the user part. When Windows restarts, the underlying boot up of the system much is faster, followed by loading your profile and applications normally.
Windows (and thus Uptime) does not see this as a full shutdown of your system. So the system uptime value will not be reset to zero. If you want more control over this, you can create two shortcuts, and use the one you want depending on whether you wish a "full" shut down, or the normal "hybrid" one.
Normal / Hybrid Shut Down:
%windir%\System32\shutdown.exe /s /hybrid /f /t 00
Full Shut Down:
%windir%\System32\shutdown.exe /s /f /t 00
You can create these shortcuts, and put them on your desktop or pin them to your Windows 10 Start menu. "Restart" always does a full system restart and is not affected.
Alternatively, you can use a SysInfo plugin measure to get a timestamp value for when the user account logged on to Windows with the USER_LOGINTIME SysInfoType option. When a standard hybrid shutdown is done, this will then reflect when the restart took place. Use the value of this measure with the SecondsValue
option in an Uptime measure to format the elapsed seconds.
Example:
[MeasureCurrentTime] |