Class: FFI::Tcl::TclTime
Constant Summary
Constants inherited
from PrettyStruct
PrettyStruct::ACCESSOR_CODE
Instance Method Summary
collapse
#inspect, layout
Constructor Details
#initialize(seconds = nil, microseconds = nil) ⇒ TclTime
Returns a new instance of TclTime.
10
11
12
13
14
|
# File 'lib/ffi-tk/ffi/tcl/time.rb', line 10
def initialize(seconds = nil, microseconds = nil)
super()
self[:sec] = seconds.to_i if seconds
self[:usec] = microseconds.to_i if microseconds
end
|
Instance Method Details
#microseconds ⇒ Object
Also known as:
usec
21
22
23
|
# File 'lib/ffi-tk/ffi/tcl/time.rb', line 21
def microseconds
self[:usec]
end
|
#microseconds=(microseconds) ⇒ Object
Also known as:
usec=
31
32
33
|
# File 'lib/ffi-tk/ffi/tcl/time.rb', line 31
def microseconds=(microseconds)
self[:usec] = microseconds
end
|
#seconds ⇒ Object
Also known as:
sec
16
17
18
|
# File 'lib/ffi-tk/ffi/tcl/time.rb', line 16
def seconds
self[:sec]
end
|
#seconds=(seconds) ⇒ Object
Also known as:
sec=
26
27
28
|
# File 'lib/ffi-tk/ffi/tcl/time.rb', line 26
def seconds=(seconds)
self[:sec] = seconds
end
|