[Spice-devel] [spice-streaming-agent PATCH v2] mjpeg: get_time: fix conversion of seconds to nanaseconds
Uri Lublin
uril at redhat.com
Wed Apr 3 17:33:17 UTC 2019
1 second is 10^9 nanosecond, not 10^10.
Signed-off-by: Uri Lublin <uril at redhat.com>
Acked-by: Victor Toso <victortoso at redhat.com>
---
changes since V1:
- Subject and log message reworded (Frediano, Victor)
---
src/mjpeg-fallback.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/mjpeg-fallback.cpp b/src/mjpeg-fallback.cpp
index 09f3769..1b263f2 100644
--- a/src/mjpeg-fallback.cpp
+++ b/src/mjpeg-fallback.cpp
@@ -26,7 +26,7 @@ static inline uint64_t get_time()
clock_gettime(CLOCK_MONOTONIC, &now);
- return (uint64_t)now.tv_sec * 10000000000u + (uint64_t)now.tv_nsec;
+ return (uint64_t)now.tv_sec * 1000000000u + (uint64_t)now.tv_nsec;
}
namespace {
--
2.20.1
More information about the Spice-devel
mailing list