mirror of
https://github.com/Hofknecht/SystemTrayMenu.git
synced 2024-09-30 09:06:32 +13:00
Remove obsolete class EventDelay
(not used since 1.3.0.4)
This commit is contained in:
parent
13e7cedaa6
commit
9fd7da2e98
3 changed files with 4 additions and 31 deletions
|
@ -6,7 +6,9 @@ namespace SystemTrayMenu.Helpers
|
|||
{
|
||||
using System;
|
||||
using System.Windows.Input;
|
||||
#if TODO //HOTKEY
|
||||
using SystemTrayMenu.UserInterface.HotkeyTextboxControl;
|
||||
#endif
|
||||
using SystemTrayMenu.Utilities;
|
||||
using static SystemTrayMenu.Utilities.FormsExtensions;
|
||||
|
||||
|
|
|
@ -1,31 +0,0 @@
|
|||
// <copyright file="EventDelay.cs" company="PlaceholderCompany">
|
||||
// Copyright (c) PlaceholderCompany. All rights reserved.
|
||||
// </copyright>
|
||||
|
||||
namespace SystemTrayMenu.UserInterface.HotkeyTextboxControl
|
||||
{
|
||||
using System;
|
||||
|
||||
public class EventDelay
|
||||
{
|
||||
private readonly object checkLock = new();
|
||||
private readonly long waitTime;
|
||||
private long lastCheck;
|
||||
|
||||
public EventDelay(long ticks)
|
||||
{
|
||||
waitTime = ticks;
|
||||
}
|
||||
|
||||
public bool Check()
|
||||
{
|
||||
lock (checkLock)
|
||||
{
|
||||
long now = DateTime.Now.Ticks;
|
||||
bool isPassed = now - lastCheck > waitTime;
|
||||
lastCheck = now;
|
||||
return isPassed;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -7,7 +7,9 @@ namespace SystemTrayMenu.Utilities
|
|||
using System;
|
||||
using System.Diagnostics;
|
||||
using System.Linq;
|
||||
#if TODO //HOTKEY
|
||||
using SystemTrayMenu.UserInterface.HotkeyTextboxControl;
|
||||
#endif
|
||||
|
||||
internal static class SingleAppInstance
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue