From 72d3b257b0f4525732af0a779dbfe32520484256 Mon Sep 17 00:00:00 2001 From: Jacob Su Date: Wed, 6 Mar 2024 22:09:23 +0800 Subject: [PATCH] issue #3976: fix time unit problem. --- trunk/src/core/srs_core_time.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/trunk/src/core/srs_core_time.hpp b/trunk/src/core/srs_core_time.hpp index c10c7c9b1b..c0134032e1 100644 --- a/trunk/src/core/srs_core_time.hpp +++ b/trunk/src/core/srs_core_time.hpp @@ -25,12 +25,12 @@ typedef int64_t srs_utime_t; // Convert srs_utime_t as second. #define srsu2s(us) ((us) / SRS_UTIME_SECONDS) -#define srsu2si(us) ((us) / SRS_UTIME_SECONDS) +#define srsu2si(us) int((us) / SRS_UTIME_SECONDS) // Them time duration = end - start. return 0, if start or end is 0. srs_utime_t srs_duration(srs_utime_t start, srs_utime_t end); -// The time unit in ms, for example 120 * SRS_UTIME_SECONDS means 120s. +// The time unit in seconds, for example 120 * SRS_UTIME_SECONDS means 120s. #define SRS_UTIME_SECONDS 1000000LL // The time unit in minutes, for example 3 * SRS_UTIME_MINUTES means 3m.