TCnServiceController.WaitForStatus(TServiceControllerStatus) Method
Infinitely waits for the service to reach the specified status.
public procedure WaitForStatus(DesiredStatus: TServiceControllerStatus); overload;
Parameters
- DesiredStatus
- Type: System.Void
The status to wait for.
Use WaitForStatus to suspend an application's processing until the service has reached the required status.
Note |
---|
The WaitForStatus method waits approximately 250 milliseconds between each status check. WaitForStatus cannot detect the case of the observed service changing to the desiredStatus and then immediately to another status in that interval. |