InertiaProcessor2D.Complete(Int64) 메서드

정의

지정된 타임스탬프를 사용하여 최종 추정을 완료하고 Completed 이벤트를 발생시킵니다.

public:
 void Complete(long timestamp);
public void Complete (long timestamp);
member this.Complete : int64 -> unit
Public Sub Complete (timestamp As Long)

매개 변수

timestamp
Int64

100나노초 눈금으로 추정을 완료하기 위한 타임스탬프입니다.

예외

타임스탬프 매개 변수가 초기 또는 이전 타임스탬프보다 작은 경우

예제

다음 예제에 대 한 이벤트 처리기를 ManipulationProcessor2D.Started 이벤트 확인 하 고 그럴 경우 관성 처리에서 실행 되는 경우 호출 하 여 중지 된 Complete 메서드.

#region OnManipulationStarted
private void OnManipulationStarted(object sender, Manipulation2DStartedEventArgs e)
{
    if (inertiaProcessor.IsRunning)
    {
        inertiaProcessor.Complete(Timestamp);
    }
}
#endregion
#region Timestamp
private long Timestamp
{
    get
    {
        // Get timestamp in 100-nanosecond units.
        double nanosecondsPerTick = 1000000000.0 / System.Diagnostics.Stopwatch.Frequency;
        return (long)(System.Diagnostics.Stopwatch.GetTimestamp() / nanosecondsPerTick / 100.0);
    }
}
#endregion

설명

타임 스탬프는 100 나노초 단위에서입니다.

적용 대상