Optimum delay for checking Windows Service Status?

Just starting out? Need help? Post your questions and find answers here.
User avatar
RichAlgeni
Addict
Addict
Posts: 914
Joined: Wed Sep 22, 2010 1:50 am
Location: Bradenton, FL

Optimum delay for checking Windows Service Status?

Post 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