diff --git a/Advapi32.cs b/Advapi32.cs index 174c3d0..a9a4fc7 100755 --- a/Advapi32.cs +++ b/Advapi32.cs @@ -49,7 +49,7 @@ namespace winsw public void ChangeConfig(TimeSpan failureResetPeriod, List actions) { SERVICE_FAILURE_ACTIONS sfa = new SERVICE_FAILURE_ACTIONS(); - sfa.dwResetPeriod = failureResetPeriod.Seconds; + sfa.dwResetPeriod = (int)failureResetPeriod.TotalSeconds; sfa.lpRebootMsg = ""; // delete message sfa.lpCommand = ""; // delete the command to run