Motion time periods were calculated incorrectly. Thanks to Jesse Crossen for pointing it out.

git-svn-id: svn+ssh://svn.code.sf.net/p/spacenav/code/trunk/spacenavd@116 ef983eb1-d774-4af8-acfd-baaf7b16a646
pull/1/head
John Tsiombikas 2011-06-06 12:34:37 +00:00
rodzic e5e7f92e18
commit 36b51c2b90
1 zmienionych plików z 5 dodań i 5 usunięć

Wyświetl plik

@ -130,9 +130,9 @@ static void send_event(spnav_event *ev, struct client *c)
static unsigned int msec_dif(struct timeval tv1, struct timeval tv2)
{
unsigned int ds, du;
unsigned int ms1, ms2;
ds = tv2.tv_sec - tv1.tv_sec;
du = tv2.tv_usec - tv1.tv_usec;
return ds * 1000 + du / 1000;
ms1 = tv1.tv_sec * 1000 + tv1.tv_usec / 1000;
ms2 = tv2.tv_sec * 1000 + tv2.tv_usec / 1000;
return ms1 - ms2;
}