[nut-Patches][313714] Use monotonic clock for monitoring
    nut-patches at alioth.debian.org 
    nut-patches at alioth.debian.org
       
    Mon Jul  9 12:46:08 UTC 2012
    
    
  
nut-Patches item #313714, was changed at 2012-07-09 08:46 by Charles Lepple
You can respond by visiting: 
https://alioth.debian.org/tracker/?func=detail&atid=411544&aid=313714&group_id=30602
Status: Open
Priority: 3
Submitted By: Baruch Even (baruch)
Assigned to: Nobody (None)
Summary: Use monotonic clock for monitoring 
Category: None
Group: None
Resolution: None
Initial Comment:
The current logic uses time(2) to decide whether it is time to monitor again or not, however if the time is moved backwards monitoring will cease to be performed until the time difference is caught up. The attached patch switches the code to clock_gettime(2) using CLOCK_MONOTONIC.
----------------------------------------------------------------------
>Comment By: Charles Lepple (clepple-guest)
Date: 2012-07-09 08:46
Message:
The patch ignores the return value of clock_gettime(). Probably not a concern for Linux or FreeBSD, but Solaris documentation (for instance) does not list CLOCK_MONOTONIC:
http://docs.oracle.com/cd/E19109-01/tsolaris7/805-8069/6j7j9vnt1/index.html
----------------------------------------------------------------------
You can respond by visiting: 
https://alioth.debian.org/tracker/?func=detail&atid=411544&aid=313714&group_id=30602
    
    
More information about the NUT-tracker
mailing list