class Fzeet::Windows::SYSTEMTIME

Public Class Methods

[](time) click to toggle source
# File lib/fzeet/windows/core/SystemTime.rb, line 16
def self.[](time) new.set(time) end
Also aliased as: from
from(time)
Alias for: []

Public Instance Methods

==(other) click to toggle source
# File lib/fzeet/windows/core/SystemTime.rb, line 41
def ==(other) members.all? { |member| self[member] == other[member] } end
dup() click to toggle source
# File lib/fzeet/windows/core/SystemTime.rb, line 23
def dup; self.class.new.tap { |st| st.members.each { |member| st[member] = self[member] } } end
get(as = :local) click to toggle source
# File lib/fzeet/windows/core/SystemTime.rb, line 25
def get(as = :local)
        Time.send(as,
                self[:wYear], self[:wMonth], self[:wDay],
                self[:wHour], self[:wMinute], self[:wSecond], self[:wMilliseconds] * 1000
        )
end
set(time) click to toggle source
# File lib/fzeet/windows/core/SystemTime.rb, line 32
def set(time)
        tap { |st|
                st[:wYear], st[:wMonth], st[:wDay],
                st[:wHour], st[:wMinute], st[:wSecond], st[:wMilliseconds] =
                time.year, time.month, time.day,
                time.hour, time.min, time.sec, (time.usec.to_f / 1000).round
        }
end