Refine ms in time unit

pull/1651/head
winlin 6 years ago
parent 5af572ab50
commit d306ee7506

@ -109,7 +109,7 @@ private:
// for live play duration, for instance, rtmpdump to record. // for live play duration, for instance, rtmpdump to record.
// @see https://github.com/ossrs/srs/issues/47 // @see https://github.com/ossrs/srs/issues/47
srs_utime_t duration; srs_utime_t duration;
// the MR(merged-write) sleep time in ms. // the MR(merged-write) sleep time in srs_utime_t.
srs_utime_t mw_sleep; srs_utime_t mw_sleep;
// the MR(merged-write) only enabled for play. // the MR(merged-write) only enabled for play.
int mw_enabled; int mw_enabled;

@ -53,7 +53,7 @@ using namespace std;
#include <srs_app_thread.hpp> #include <srs_app_thread.hpp>
#include <srs_app_coworkers.hpp> #include <srs_app_coworkers.hpp>
// system interval in ms, // system interval in srs_utime_t,
// all resolution times should be times togother, // all resolution times should be times togother,
// for example, system-interval is x=1s(1000ms), // for example, system-interval is x=1s(1000ms),
// then rusage can be 3*x, for instance, 3*1=3s, // then rusage can be 3*x, for instance, 3*1=3s,

@ -32,7 +32,7 @@ typedef int64_t srs_utime_t;
// The time unit in ms, for example 100 * SRS_UTIME_MILLISECONDS means 100ms. // The time unit in ms, for example 100 * SRS_UTIME_MILLISECONDS means 100ms.
#define SRS_UTIME_MILLISECONDS 1000 #define SRS_UTIME_MILLISECONDS 1000
// Convert srs_utime_t in ms unit. // Convert srs_utime_t as ms.
#define srsu2ms(us) (us / SRS_UTIME_MILLISECONDS) #define srsu2ms(us) (us / SRS_UTIME_MILLISECONDS)
#define srsu2msi(us) int(us / SRS_UTIME_MILLISECONDS) #define srsu2msi(us) int(us / SRS_UTIME_MILLISECONDS)

@ -87,7 +87,7 @@ public:
// Set the timeout tm in srs_utime_t for recv bytes from peer. // Set the timeout tm in srs_utime_t for recv bytes from peer.
// @remark Use SRS_UTIME_NO_TIMEOUT to never timeout. // @remark Use SRS_UTIME_NO_TIMEOUT to never timeout.
virtual void set_recv_timeout(srs_utime_t tm) = 0; virtual void set_recv_timeout(srs_utime_t tm) = 0;
// Get the timeout in ms for recv bytes from peer. // Get the timeout in srs_utime_t for recv bytes from peer.
virtual srs_utime_t get_recv_timeout() = 0; virtual srs_utime_t get_recv_timeout() = 0;
// For handshake. // For handshake.
public: public:
@ -123,7 +123,7 @@ public:
virtual ~ISrsProtocolReadWriter(); virtual ~ISrsProtocolReadWriter();
// For protocol // For protocol
public: public:
// Whether the specified tm in ms is never timeout. // Whether the specified tm in srs_utime_t is never timeout.
virtual bool is_never_timeout(srs_utime_t tm) = 0; virtual bool is_never_timeout(srs_utime_t tm) = 0;
}; };

Loading…
Cancel
Save