DisplayChannel: Use NSEC_PER_MILLISEC

Instead of using 1000*1000

Signed-off-by: Jonathon Jongsma <jjongsma@redhat.com>
Acked-by: Frediano Ziglio <fziglio@redhat.com>
This commit is contained in:
Jonathon Jongsma 2017-11-16 13:49:03 -06:00
parent 0975b92ba7
commit cac9629409

View File

@ -211,10 +211,10 @@ int display_channel_get_streams_timeout(DisplayChannel *display)
stream = SPICE_CONTAINEROF(item, VideoStream, link);
red_time_t delta = (stream->last_time + RED_STREAM_TIMEOUT) - now;
if (delta < 1000 * 1000) {
if (delta < NSEC_PER_MILLISEC) {
return 0;
}
timeout = MIN(timeout, (unsigned int)(delta / (1000 * 1000)));
timeout = MIN(timeout, (unsigned int)(delta / (NSEC_PER_MILLISEC)));
}
return timeout;
}