ClockController.Stop 方法

定義

停止目標 ClockStops the target Clock.

public:
 void Stop();
public void Stop ();
member this.Stop : unit -> unit
Public Sub Stop ()

備註

這個方法會將目標時鐘的CurrentState變更Stopped為。This method changes the target clock's CurrentState to Stopped.

您可以Begin使用、 SeekStopped 方法來SeekAlignedToLastTick重新開機時鐘。A Stopped clock can be restarted by using the Begin, Seek, or SeekAlignedToLastTick method.

這個方法在下一次處理滴答時, 不會影響計時樹狀結構。This method has no effect on the timing tree until the next time a tick is processed. 就副作用而言, 在那之前, 也不會引發適當的事件。As a side-effect, the appropriate events also will not be raised until then.

停止時鐘會觸發CurrentGlobalSpeedInvalidatedCurrentStateInvalidated Completed事件, 而不是事件。Stopping a clock triggers the CurrentGlobalSpeedInvalidated and CurrentStateInvalidated events, but not the Completed event.

適用於