From e313e84e474d03b29ff63d05ba813994da2f6a1e Mon Sep 17 00:00:00 2001 From: Utku Demir Date: Sat, 1 May 2021 18:41:12 +1200 Subject: [PATCH] Reduce the time tick frequency to reduce idle CPU time Closes #22 --- CHANGELOG.md | 4 ++++ src/App.hs | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 41b236d..7011fe5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog +## Unreleaased: + +* fix: Reduce idle CPU use + ## 0.1.7 - 2021-03-28 * feat: Ability to yank selected store path to clipboard (shortcut: 'y') diff --git a/src/App.hs b/src/App.hs index bc0c136..fa1592c 100644 --- a/src/App.hs +++ b/src/App.hs @@ -117,7 +117,7 @@ run env = do chan <- B.newBChan 10 void . forkIO $ forever $ do - threadDelay (100 * 100) + threadDelay (100 * 1000) t <- getTime _ <- B.writeBChanNonBlocking chan (EventTick t) return ()