[PATCH spice-server 4/7] DisplayChannel: Use NSEC_PER_MILLISEC

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Instead of using 1000*1000

Signed-off-by: Jonathon Jongsma <jjongsma@xxxxxxxxxx>
---
 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

_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/spice-devel




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]     [Monitors]