mirror of
https://github.com/PepperDash/PepperDashCore.git
synced 2026-04-12 03:57:08 +00:00
add StopDebugTimer method
This commit is contained in:
parent
c253007def
commit
895873c51e
1 changed files with 15 additions and 16 deletions
|
|
@ -79,15 +79,7 @@ namespace PepperDash.Core
|
||||||
|
|
||||||
_DebugTimeoutInMs = minutes * 60000;
|
_DebugTimeoutInMs = minutes * 60000;
|
||||||
|
|
||||||
if (DebugExpiryPeriod != null)
|
StopDebugTimer();
|
||||||
{
|
|
||||||
DebugExpiryPeriod.Stop();
|
|
||||||
DebugExpiryPeriod.Dispose();
|
|
||||||
DebugExpiryPeriod = null;
|
|
||||||
}
|
|
||||||
|
|
||||||
RxStreamDebuggingIsEnabled = false;
|
|
||||||
TxStreamDebuggingIsEnabled = false;
|
|
||||||
|
|
||||||
DebugExpiryPeriod = new CTimer((o) => DisableDebugging(), _DebugTimeoutInMs);
|
DebugExpiryPeriod = new CTimer((o) => DisableDebugging(), _DebugTimeoutInMs);
|
||||||
|
|
||||||
|
|
@ -106,17 +98,24 @@ namespace PepperDash.Core
|
||||||
/// </summary>
|
/// </summary>
|
||||||
private void DisableDebugging()
|
private void DisableDebugging()
|
||||||
{
|
{
|
||||||
if (DebugExpiryPeriod != null)
|
StopDebugTimer();
|
||||||
{
|
|
||||||
DebugExpiryPeriod.Stop();
|
Debug.SetDeviceDebugSettings(ParentDeviceKey, eStreamDebuggingSetting.Off);
|
||||||
DebugExpiryPeriod.Dispose();
|
|
||||||
DebugExpiryPeriod = null;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void StopDebugTimer()
|
||||||
|
{
|
||||||
RxStreamDebuggingIsEnabled = false;
|
RxStreamDebuggingIsEnabled = false;
|
||||||
TxStreamDebuggingIsEnabled = false;
|
TxStreamDebuggingIsEnabled = false;
|
||||||
|
|
||||||
Debug.SetDeviceDebugSettings(ParentDeviceKey, eStreamDebuggingSetting.Off);
|
if (DebugExpiryPeriod == null)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
DebugExpiryPeriod.Stop();
|
||||||
|
DebugExpiryPeriod.Dispose();
|
||||||
|
DebugExpiryPeriod = null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue