class SysInfo
def find_uptime
Based on Ruby Quiz solutions by: Matthias Reitinger
'sysctl -b kern.boottime' os osx, and 'who -b' on unix.
Returns the local uptime in hours. Use Win32API in Windows,
def find_uptime hours = 0 begin seconds = execute_platform_specific("find_uptime") || 0 hours = seconds / 3600 # seconds to hours rescue => ex #puts ex.message # TODO: implement debug? end hours end