mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-08-31 19:08:29 +00:00
Refator: Refactor timer implementation across multiple classes to use System.Timers.Timer instead of CTimer for improved consistency and performance.
- Updated RelayControlledShade to utilize Timer for output pulsing. - Refactored MockVC to replace CTimer with Timer for call status simulation. - Modified VideoCodecBase to enhance documentation and improve feedback handling. - Removed obsolete IHasCamerasMessenger and updated related classes to use IHasCamerasWithControls. - Adjusted PressAndHoldHandler to implement Timer for button hold actions. - Enhanced logging throughout MobileControl and RoomBridges for better debugging and information tracking. - Cleaned up unnecessary comments and improved exception handling in various classes.
This commit is contained in:
parent
b4d53dbe0e
commit
7076eafc21
56 changed files with 1343 additions and 2197 deletions
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Crestron.SimplSharp;
|
||||
using System.Timers;
|
||||
using PepperDash.Core;
|
||||
using Serilog.Events;
|
||||
|
||||
|
|
@ -56,16 +56,14 @@ namespace PepperDash.Essentials.Devices.Common.Codec
|
|||
}
|
||||
}
|
||||
|
||||
private readonly CTimer _scheduleChecker;
|
||||
private Timer _scheduleChecker;
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the CodecScheduleAwareness class with default poll time
|
||||
/// </summary>
|
||||
public CodecScheduleAwareness()
|
||||
{
|
||||
Meetings = new List<Meeting>();
|
||||
|
||||
_scheduleChecker = new CTimer(CheckSchedule, null, 1000, 1000);
|
||||
Init(1000);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
|
@ -73,10 +71,17 @@ namespace PepperDash.Essentials.Devices.Common.Codec
|
|||
/// </summary>
|
||||
/// <param name="pollTime">The poll time in milliseconds for checking schedule changes</param>
|
||||
public CodecScheduleAwareness(long pollTime)
|
||||
{
|
||||
Init(pollTime);
|
||||
}
|
||||
|
||||
private void Init(long pollTime)
|
||||
{
|
||||
Meetings = new List<Meeting>();
|
||||
|
||||
_scheduleChecker = new CTimer(CheckSchedule, null, pollTime, pollTime);
|
||||
_scheduleChecker = new Timer(pollTime) { AutoReset = true };
|
||||
_scheduleChecker.Elapsed += (s, e) => CheckSchedule(null);
|
||||
_scheduleChecker.Start();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue