diff options
author | William Van Hevelingen <wvan13@gmail.com> | 2010-08-18 15:40:24 -0700 |
---|---|---|
committer | Rein Henrichs <rein@puppetlabs.com> | 2010-10-04 14:20:57 -0700 |
commit | e6bfdf9bf7a0d929dc7d882d3ea3bcb7372b75e0 (patch) | |
tree | 8d313c527ffdca5e379e18a365f2f0166e078607 /lib | |
parent | 8c4d0cd4d25534f0f585773b6b5ff70b8a5617f9 (diff) | |
download | facter-e6bfdf9bf7a0d929dc7d882d3ea3bcb7372b75e0.tar.gz facter-e6bfdf9bf7a0d929dc7d882d3ea3bcb7372b75e0.tar.xz facter-e6bfdf9bf7a0d929dc7d882d3ea3bcb7372b75e0.zip |
Fix for bug #4569
* getTickCount.call() is not an epoch time value so compute_uptime
is not necessary
Signed-off-by: William Van Hevelingen <wvan13@gmail.com>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/facter/util/uptime.rb | 2 |
1 files changed, 1 insertions, 1 deletions
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 |