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!) -> Int64Parameters
candidatea new candidate measurement
Return Value
the current offset
-
get best dispersion at current time
Declaration
Objective-C
- (int64_t)getCurrentDispersion;Swift
func getCurrentDispersion() -> Int64Return Value
best dispersion value at current time
-
get best offset in nanoseconds
Declaration
Objective-C
- (int64_t)getCandidateOffset;Swift
func getCandidateOffset() -> Int64Return Value
get best candidate’s offset
-
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() -> UInt32Return 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() -> Int64Return 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() -> FloatReturn Value
percentage of useful candidate measurements
View on GitHub
IWCAlgo Protocol Reference