From d4d748e153668c2e8d807b86cdd9c1ca94fb50d8 Mon Sep 17 00:00:00 2001 From: apio Date: Sat, 13 Jan 2024 16:26:37 +0100 Subject: [PATCH] terminal: Remove m_cursor_timer->restart() from tick_cursor() Since the timer was created as a repeating timer, it is already restarted after the function. --- libos/src/Timer.cpp | 6 +----- terminal/TerminalWidget.cpp | 1 - 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/libos/src/Timer.cpp b/libos/src/Timer.cpp index 4ac08fc3..42db3804 100644 --- a/libos/src/Timer.cpp +++ b/libos/src/Timer.cpp @@ -95,11 +95,7 @@ namespace os m_stopped = true; } else - { - struct itimerspec itimer = { .it_interval = { .tv_sec = 0, .tv_nsec = 0 }, .it_value = m_interval }; - - timer_settime(m_timerid, 0, &itimer, nullptr); - } + restart(); } } diff --git a/terminal/TerminalWidget.cpp b/terminal/TerminalWidget.cpp index 6058e95f..98e56ab4 100644 --- a/terminal/TerminalWidget.cpp +++ b/terminal/TerminalWidget.cpp @@ -122,7 +122,6 @@ void TerminalWidget::tick_cursor() { if (!m_cursor_enabled) return; - m_cursor_timer->restart(); m_cursor_activated = !m_cursor_activated; if (m_cursor_activated) draw_cursor();