Class | Sys::Uptime |
In: |
lib/windows/sys/uptime.rb
lib/unix/sys/uptime.rb lib/unix/sys/uptime.rb |
Parent: | Object |
Returns the boot time as a Time object.
Example:
Sys::Uptime.boot_time # => Fri Dec 12 20:18:58 -0700 2008
Returns a Time object indicating the time the system was last booted.
Example:
Sys::Uptime.boot_time # => Mon Jul 13 06:08:25 -0600 2009
Returns a Time object indicating the time the system was last booted.
Example:
Sys::Uptime.boot_time # => Mon Jul 13 06:08:25 -0600 2009
Returns the total number of days the system has been up on host, or the localhost if no host is provided.
Example:
Sys::Uptime.days # => 1
Returns the total number of hours the system has been up on host, or the localhost if no host is provided.
Example:
Sys::Uptime.hours # => 33
Returns the total number of minutes the system has been up on host, or the localhost if no host is provided.
Example:
Sys::Uptime.minutes # => 1980
Returns the total number of seconds the system has been up on host, or the localhost if no host is provided.
Example:
Sys::Uptime.seconds # => 118800