Method: Evesync::NTP.time
- Defined in:
- lib/evesync/ntp.rb
.time ⇒ Object
8 9 10 11 12 13 14 15 16 17 18 19 20 |
# File 'lib/evesync/ntp.rb', line 8 def self.time begin Timeout.timeout(5) do Net::NTP.get(Config['ntp']).time end rescue Errno::ECONNREFUSED Log.warn('NTP not configured. Using local time for timestamps') Time.now rescue Timeout::Error Log.warn('NTP timeout. Using local time') Time.now end end |