From facb99b9130a0f15bf8145b489ffce68370b5e91 Mon Sep 17 00:00:00 2001 From: David Herrmann Date: Tue, 4 Sep 2012 18:42:31 +0200 Subject: [PATCH] terminal: print debug warning when skipping frames If the CPU is too slow to render the console in a decent speed and we have to skip frames, then we should print warnings if debug mode is on. Signed-off-by: David Herrmann --- src/terminal.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/terminal.c b/src/terminal.c index 99e7a52..ac48677 100644 --- a/src/terminal.c +++ b/src/terminal.c @@ -115,6 +115,9 @@ static void redraw_timer_event(struct ev_timer *timer, uint64_t num, void *data) * fps-timeouts for 1s is really faster than calling * ev_timer_enable/disable() all the time. */ + if (num > 1) + log_debug("CPU is too slow; skipping %llu frames", num - 1); + if (term->redraw-- != term->fps) { if (!term->redraw) { ev_timer_disable(term->redraw_timer); -- 2.7.4