From e3dc184882e6512453929a6a8932785a6658aaab Mon Sep 17 00:00:00 2001 From: Daniel Eklöf Date: Tue, 30 Jul 2019 22:06:02 +0200 Subject: term: break out 'flash' to a separate 'term' function --- osc.c | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) (limited to 'osc.c') diff --git a/osc.c b/osc.c index 20d80c9e..3424d476 100644 --- a/osc.c +++ b/osc.c @@ -3,8 +3,6 @@ #include #include -#include - #define LOG_MODULE "osc" #define LOG_ENABLE_DBG 0 #include "log.h" @@ -205,17 +203,7 @@ osc_flash(struct terminal *term) { /* Our own private - flash */ unsigned duration_ms = vt_param_get(term, 1, 100); - LOG_DBG("FLASH for %ums", duration_ms); - - struct itimerspec alarm = { - .it_value = {.tv_sec = 0, .tv_nsec = duration_ms * 1000000}, - }; - - if (timerfd_settime(term->flash.fd, 0, &alarm, NULL) < 0) - LOG_ERRNO("failed to arm flash timer"); - else { - term->flash.active = true; - } + term_flash(term, duration_ms); } void -- cgit v1.3