From e6bfdf9bf7a0d929dc7d882d3ea3bcb7372b75e0 Mon Sep 17 00:00:00 2001 From: William Van Hevelingen Date: Wed, 18 Aug 2010 15:40:24 -0700 Subject: Fix for bug #4569 * getTickCount.call() is not an epoch time value so compute_uptime is not necessary Signed-off-by: William Van Hevelingen --- lib/facter/util/uptime.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/facter/util/uptime.rb b/lib/facter/util/uptime.rb index 353ebf5..b62d7e9 100644 --- a/lib/facter/util/uptime.rb +++ b/lib/facter/util/uptime.rb @@ -10,7 +10,7 @@ module Facter::Util::Uptime def self.get_uptime_seconds_win require 'Win32API' getTickCount = Win32API.new("kernel32", "GetTickCount", nil, 'L') - compute_uptime(Time.at(getTickCount.call() / 1000.0)) + (getTickCount.call() / 1000.0).to_i end private -- cgit