util-time: fix the us2ms function

Turns out this was converting in the wrong direction and the only call
site we had didn't notice/care.
This commit is contained in:
Peter Hutterer 2023-01-31 19:24:55 +10:00
parent 642e258ecb
commit affc464caa
2 changed files with 2 additions and 2 deletions

View file

@ -42,7 +42,7 @@ us(uint64_t us)
static inline uint64_t
us2ms(uint64_t us)
{
return us * 1000;
return us / 1000;
}
static inline uint64_t

View file

@ -455,7 +455,7 @@ int main(int argc, char **argv)
if (!receiver) {
uint64_t now = ei_now(ei);
uint32_t interval = us2ms(10); /* pretend events are 10ms apart */
uint64_t interval = ms2us(10); /* pretend events are 10ms apart */
if (have_ptr) {
colorprint("sending motion event\n");