From: Imre Vadasz Date: Thu, 24 Dec 2015 11:50:37 +0000 (+0100) Subject: moused: Omit superfluous gettimeofday calls when mouse only moves X-Git-Tag: v4.6.0rc~1130 X-Git-Url: https://gitweb.dragonflybsd.org/~tuxillo/dragonfly.git/commitdiff_plain/c035a3e5b0421938ba7530a7ff839418a2ee8315 moused: Omit superfluous gettimeofday calls when mouse only moves The gettimeofday() is only needed when a mouse button state changed. --- diff --git a/usr.sbin/moused/moused.c b/usr.sbin/moused/moused.c index b41cc23323..054c0d8fb1 100644 --- a/usr.sbin/moused/moused.c +++ b/usr.sbin/moused/moused.c @@ -2327,10 +2327,8 @@ r_timestamp(mousestatus_t *act) int i; mask = act->flags & MOUSE_BUTTONS; -#if 0 if (mask == 0) return; -#endif gettimeofday(&tv1, NULL);