title: RequestAdditionalTime has no effect
body: <p>I have a Windows Service that Imports files into DB. When the Service receives to stop notification, It should complete the current Import if possible. It can take several minutes to complete.<br>
  Therefore I use the <a href="https://msdn.microsoft.com/en-us/library/system.serviceprocess.servicebase.requestadditionaltime.aspx" rel="nofollow"><code>ServiceBase.RequestAdditionalTime</code></a> method to Signal the SCM that the Service is still working and operable.</p>
  
  <pre class="lang-cs prettyprint-override"><code>protected override void OnStop()
  {
     var waitTime = TimeSpan.FromSeconds(5);
     var additionalWaitTime = TimeSpan.FromMinutes(3);
  
     Trace.Write("Stopping service...");
  
     var task = Task.Factory.StartNew(() =&gt; worker.Stop());
     while (!task.Wait(waitTime))
     {
       Trace.Write("Requesting additional time...");
  
       RequestAdditionalTime((int)additionalWaitTime.TotalMilliseconds);
  
       Trace.Write("Waiting for {1} to complete...");
     }
  
     Trace.Write("Service stopped.");
  }
  </code></pre>
  
  <p>While testing, I cannot find any different behaviour of the Service using the <code>RequestAdditionalTime</code> method. If I remove the <code>RequestAdditionalTime</code> call, the Service behaves the same way:</p>
  
  <ul>
  <li>On Service Stop, the SCM waits for about 2 minutes and reports the Service is not responding (Error 1053). After that, the Service state remains <code>Stopping</code> until my worker completes. </li>
  <li>On Shutdown, the System does not wait for the additional time. It seems to kill all Services after 5 seconds (Registry Key <code>WaitToKillServiceTimeout</code>)</li>
  </ul>
  
  <h2>Question</h2>
  
  <p>What effect does the <a href="https://msdn.microsoft.com/en-us/library/system.serviceprocess.servicebase.requestadditionaltime.aspx" rel="nofollow"><code>RequestAdditionalTime</code></a> have? Where am I supposed to see a difference when using it and how can i test it?
  Several times i read that the SCM will kill the Service if no additional time requested. But I couldn't see that behaviour.</p>
  
  <p>All tests where run on my local development machine (Win 8.1), assuming that the behaviour is the same as it will be on a Windows Server OS.</p>