Page 1 of 1

Optimum delay for checking Windows Service Status?

Posted: Mon Mar 13, 2023 8:22 pm
by RichAlgeni
I can't seem to find anything that explains what the optimum delay is for checking the current status of a Windows Service. It appears the consensus of the people on this forum, most of whom have forgotten more than I will ever know, is that a 1 second delay works well. Well, I guess I'd like to know why this is the case, and if it should be less, or more. Anyone have any thoughts?

Code: Select all

While ServiceStatus\dwCurrentState = #SERVICE_RUNNING
    Delay(1000)
    Service_UpdateStatus()
Wend