cleaned up test on debounce
This commit is contained in:
@@ -43,21 +43,6 @@ int should_ignore_keypress(const struct timeval *current_time, t_fdf *fdf)
|
||||
last_milliseconds = (fdf->last_keypress_time.tv_sec % 1000) * 1000 + fdf->last_keypress_time.tv_usec / 1000;
|
||||
is_less = (current_milliseconds - last_milliseconds) < DEBOUNCE_TIME;
|
||||
|
||||
/*
|
||||
[1 705 151 587 ,905 277,49579540-1000000]
|
||||
1 705 151 587 000
|
||||
1 705 151 587 905
|
||||
1 705 151 587 % 1000 = 587
|
||||
587 * 1000 + 905 277 / 1000 = 587 000 + 905 = 587905
|
||||
|
||||
[836 763,836 066]
|
||||
ft_putchar('[');
|
||||
ft_putnbr(current_milliseconds);
|
||||
ft_putchar(',');
|
||||
ft_putnbr(last_milliseconds);
|
||||
ft_putchar(']');
|
||||
*/
|
||||
|
||||
if (!is_less)
|
||||
fdf->last_keypress_time = *current_time;
|
||||
return is_less;
|
||||
|
||||
Reference in New Issue
Block a user