class SysInfo
def find_uptime_java_windows_windows
http://msdn.microsoft.com/en-us/library/ms724408(VS.85).aspx
http://www.oreillynet.com/ruby/blog/2008/01/jruby_meets_the_windows_api_1.html
Ya, this is kinda wack. Ruby -> Java -> Kernel32. See:
def find_uptime_java_windows_windows kernel32 = com.sun.jna.NativeLibrary.getInstance('kernel32') buf = java.nio.ByteBuffer.allocate(256) (kernel32.getFunction('GetTickCount').invokeInt([256, buf].to_java).to_f / 1000).to_f end