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.
9
10
11
12
13
|
# File 'lib/ffi-tk/ffi/tcl/time.rb', line 9
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
20
21
22
|
# File 'lib/ffi-tk/ffi/tcl/time.rb', line 20
def microseconds
self[:usec]
end
|
#microseconds=(microseconds) ⇒ Object
Also known as:
usec=
30
31
32
|
# File 'lib/ffi-tk/ffi/tcl/time.rb', line 30
def microseconds=(microseconds)
self[:usec] = microseconds
end
|
#seconds ⇒ Object
Also known as:
sec
15
16
17
|
# File 'lib/ffi-tk/ffi/tcl/time.rb', line 15
def seconds
self[:sec]
end
|
#seconds=(seconds) ⇒ Object
Also known as:
sec=
25
26
27
|
# File 'lib/ffi-tk/ffi/tcl/time.rb', line 25
def seconds=(seconds)
self[:sec] = seconds
end
|