The ClockCorrelator class correlates time between the Leap Motion clock and an application clock. More...
Inherits IDisposable.
Public Member Functions | |
ClockCorrelator () | |
Creates a new Clock Correlation object for maintaining a latency-adjusted relationship between the Leap Motion system clock and an external clock. More... | |
Int64 | ExternalClockToLeapTime (Int64 applicationClock) |
Returns the Leap Motion device time corresponding to an external time. More... | |
void | UpdateRebaseEstimate (Int64 applicationClock) |
Updates the estimate of latency between render time and the Leap Motion device time. More... | |
void | UpdateRebaseEstimate (Int64 applicationClock, Int64 leapClock) |
Updates the estimate of latency between render time and the Leap Motion device time. More... | |
The ClockCorrelator class correlates time between the Leap Motion clock and an application clock.
Create a ClockCorrelator for each independent application clock.
ClockCorrelator | ( | ) |
Creates a new Clock Correlation object for maintaining a latency-adjusted relationship between the Leap Motion system clock and an external clock.
Int64 ExternalClockToLeapTime | ( | Int64 | applicationClock | ) |
Returns the Leap Motion device time corresponding to an external time.
For this function to return meaningful results, the UpdateRebaseEstimate() function must be called for each graphics frame rendered.
externalClockTime | The time in milliseconds. |
void UpdateRebaseEstimate | ( | Int64 | applicationClock | ) |
Updates the estimate of latency between render time and the Leap Motion device time.
Call this function when a frame is rendered. Uses the leap clock time at the moment this function is called.
externalClockTime | The time in milliseconds when the graphics frame is rendered. |
void UpdateRebaseEstimate | ( | Int64 | applicationClock, |
Int64 | leapClock | ||
) |
Updates the estimate of latency between render time and the Leap Motion device time.
Call this function when a frame is rendered.
externalClockTime | The time in milliseconds when the graphics frame is rendered. |
leapClock | the time in milliseconds obtained by calling Controller.Now(). |