Skip to content

Commit

Permalink
issue ossrs#3976: fix time unit problem.
Browse files Browse the repository at this point in the history
  • Loading branch information
suzp1984 committed Mar 6, 2024
1 parent fa8096a commit 72d3b25
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions trunk/src/core/srs_core_time.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 72d3b25

Please sign in to comment.