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 <dh.herrmann@googlemail.com>
This commit is contained in:
David Herrmann 2012-09-04 18:42:31 +02:00
parent 6bc433dc8b
commit facb99b913

View File

@ -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);