mirror of
https://github.com/ICDSystems/ICD.Common.Utils.git
synced 2026-04-12 12:07:05 +00:00
feat: Added an event that is raised when the system time is set
This commit is contained in:
parent
0821dcb3ca
commit
83bc344ab3
3 changed files with 11 additions and 1 deletions
|
|
@ -1,4 +1,5 @@
|
|||
#if SIMPLSHARP
|
||||
using ICD.Common.Utils.Extensions;
|
||||
#if SIMPLSHARP
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Crestron.SimplSharp;
|
||||
|
|
@ -198,6 +199,8 @@ namespace ICD.Common.Utils
|
|||
(ushort)localTime.Month,
|
||||
(ushort)localTime.Day,
|
||||
(ushort)localTime.Year);
|
||||
|
||||
OnSystemDateTimeChanged.Raise(null);
|
||||
}
|
||||
|
||||
public static eEthernetEventType GetEthernetEventType(Crestron.SimplSharp.eEthernetEventType type)
|
||||
|
|
|
|||
|
|
@ -86,6 +86,8 @@ namespace ICD.Common.Utils
|
|||
localTime.ToString("s"));
|
||||
#else
|
||||
throw new NotSupportedException();
|
||||
|
||||
OnSystemDateTimeChanged.Raise(null);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -62,6 +62,11 @@ namespace ICD.Common.Utils
|
|||
/// </summary>
|
||||
public static event EventHandler OnProgramInitializationComplete;
|
||||
|
||||
/// <summary>
|
||||
/// Raised when the system date/time has been set.
|
||||
/// </summary>
|
||||
public static event EventHandler OnSystemDateTimeChanged;
|
||||
|
||||
private static readonly SafeCriticalSection s_ProgramInitializationSection = new SafeCriticalSection();
|
||||
private static bool s_ProgramInitializationComplete;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue