njh / ruby-mqtt

Pure Ruby gem that implements the MQTT protocol, a lightweight protocol for publish/subscribe messaging.
http://www.rubydoc.info/gems/mqtt
MIT License
538 stars 135 forks source link

Use monotonic clock instead of realtime for keep_alive #132

Closed ashie closed 3 years ago

ashie commented 3 years ago

Since realtime (Time.now) is influenced by changing system time such as NTP, it's not suitable for measuring elapsed time of ping.

njh commented 3 years ago

Thanks 👍

ashie commented 3 years ago

Thanks!