[Spice-devel] [PATCH spice-server 4/7] DisplayChannel: Use NSEC_PER_MILLISEC
Jonathon Jongsma
jjongsma at redhat.com
Wed Nov 29 20:16:07 UTC 2017
Instead of using 1000*1000
Signed-off-by: Jonathon Jongsma <jjongsma at redhat.com>
---
server/display-channel.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/server/display-channel.c b/server/display-channel.c
index 96feabc3c..1c14344be 100644
--- a/server/display-channel.c
+++ b/server/display-channel.c
@@ -215,10 +215,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;
}
--
2.13.6
More information about the Spice-devel
mailing list