Module: OpenHAB::DSL::Timer::TimeCopStackItem
- Defined in:
- lib/rspec/openhab/dsl/timers/timer.rb
Overview
extend Timecop to support java time classes
Instance Method Summary collapse
Instance Method Details
#parse_time(*args) ⇒ Object
| 19 20 21 22 23 24 25 | # File 'lib/rspec/openhab/dsl/timers/timer.rb', line 19 def parse_time(*args) if args.length == 1 && args.first.is_a?(Duration) return time_klass.at(ZonedDateTime.now.plus(args.first).to_instant.to_epoch_milli / 1000.0) end super end |