Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use AndroidHighResolutionTimer for elapsed time #425

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Commits on Aug 17, 2020

  1. Use AndroidHighResolutionTimer for elapsed time

    This timer uses SystemClock.elapsedRealtimeNanos to calculate the high
    resolution timing value, which advances time when the device is asleep.
    
    Fixes a bug introduced by the paho.mqtt.java library when it was changed
    to track elapsed time using System.nanoTime. However, on android,
    nanoTime does not advance when the device is in a deep sleep. As a
    result, pings may not be sent frequently enough, resulting in client
    disconnects.
    
    See:
    eclipse-paho/paho.mqtt.java#278
    eclipse-paho/paho.mqtt.java#774
    
    Signed-off-by: Dustin Thomson <[email protected]>
    powturns committed Aug 17, 2020
    Configuration menu
    Copy the full SHA
    cd2083a View commit details
    Browse the repository at this point in the history