diff --git a/JL.Core/Lookup/Lookup.cs b/JL.Core/Lookup/Lookup.cs index 11aea3e0..dbb556fe 100644 --- a/JL.Core/Lookup/Lookup.cs +++ b/JL.Core/Lookup/Lookup.cs @@ -21,7 +21,7 @@ public static class Lookup public static List>> LookupText(string text) { DateTime preciseTimeNow = new(Stopwatch.GetTimestamp()); - if ((preciseTimeNow - s_lastLookupTime).Milliseconds < Storage.Frontend.CoreConfig.LookupRate) return null; + if ((preciseTimeNow - s_lastLookupTime).TotalMilliseconds < Storage.Frontend.CoreConfig.LookupRate) return null; s_lastLookupTime = preciseTimeNow; if (Storage.Frontend.CoreConfig.KanjiMode) diff --git a/JL.Core/Storage.cs b/JL.Core/Storage.cs index 04af964d..98c7d0f7 100644 --- a/JL.Core/Storage.cs +++ b/JL.Core/Storage.cs @@ -25,7 +25,7 @@ public static class Storage // public static readonly string ResourcesPath = Path.Join(Directory.GetCurrentDirectory(), "Resources"); public static readonly HttpClient Client = new(new HttpClientHandler { UseProxy = false }); - public static readonly Version Version = new(1, 6); + public static readonly Version Version = new(1, 7); public static readonly string RepoUrl = "https://github.com/rampaa/JL/"; public static bool Ready { get; set; } = false; public static bool UpdatingJMdict { get; set; } = false; diff --git a/JL.Windows/GUI/MainWindow.xaml.cs b/JL.Windows/GUI/MainWindow.xaml.cs index b8c37950..8b3b8d77 100644 --- a/JL.Windows/GUI/MainWindow.xaml.cs +++ b/JL.Windows/GUI/MainWindow.xaml.cs @@ -119,7 +119,8 @@ private void CopyFromClipboard() private void ClipboardChanged(object sender, EventArgs e) { DateTime currentTime = new(Stopwatch.GetTimestamp()); - if ((currentTime - _lastClipboardChangeTime).Milliseconds > 5) + + if ((currentTime - _lastClipboardChangeTime).TotalMilliseconds > 5) { _lastClipboardChangeTime = currentTime; CopyFromClipboard();