Method: LinuxStat::OS.uptime_f
- Defined in:
- lib/linux_stat/os.rb
.uptime_f ⇒ Object
Returns Float uptime of the system reported by /proc/uptime
LinuxStat::OS.uptime_f
=> 28956.34
The value is generally rounded to 2 decimal places.
Using uptime_f is 10x slower than using uptime_i
If the stat isn’t available, nil is returned.
180 181 182 |
# File 'lib/linux_stat/os.rb', line 180 def uptime_f LinuxStat::ProcFS.uptime_f end |