IWCAlgo

@protocol IWCAlgo <NSObject>

Protocol for Wall Clock Client algorithms

  • process this candidate measurement - parameter: candidate a new candidate measurement - returns: the current offset

    Declaration

    Objective-C

    - (int64_t)processMeasurement:(Candidate *)candidate;

    Swift

    func processMeasurement(_ candidate: Candidate!) -> Int64

    Parameters

    candidate

    a new candidate measurement

    Return Value

    the current offset

  • get best dispersion at current time

    Declaration

    Objective-C

    - (int64_t)getCurrentDispersion;

    Swift

    func getCurrentDispersion() -> Int64

    Return Value

    best dispersion value at current time

  • get best offset in nanoseconds

    Declaration

    Objective-C

    - (int64_t)getCandidateOffset;

    Swift

    func getCandidateOffset() -> Int64

    Return Value

    get best candidate’s offset

  • Get the current best candidate seen by the algorithm.

    Declaration

    Objective-C

    - (Candidate *)getBestCandidate;

    Swift

    func getBestCandidate() -> Candidate!

    Return Value

    the current best candidate (a Candidate object)

  • Get wait time for next request. Based of the dispersion value of the last candidate, the WC algorithm (i.e. an object implementing IWCAlgo interface) sets the send time for the next WC request.

    Declaration

    Objective-C

    - (uint32_t)getNextReqWaitTime;

    Swift

    func getNextReqWaitTime() -> UInt32

    Return Value

    wait time in micro-seconds.

  • Time between candidates that caused a WallClock time adjustment

    Declaration

    Objective-C

    - (int64_t)timeBetweenUsefulCandidatesNanos;

    Swift

    optional func timeBetweenUsefulCandidatesNanos() -> Int64

    Return Value

    time in nanoseconds

  • Get the percentage of candidate measurements that led to a wallclock time readjustment.

    Declaration

    Objective-C

    - (float)usefulCandidatesPercent;

    Swift

    optional func usefulCandidatesPercent() -> Float

    Return Value

    percentage of useful candidate measurements