1
0
Fork 0
mirror of https://github.com/ossrs/srs.git synced 2025-03-09 15:49:59 +00:00

SquashSRS4: Refine performance for FastTimer

This commit is contained in:
winlin 2021-05-07 11:25:37 +08:00
parent f995bf7ca8
commit fd6c653d3c
12 changed files with 216 additions and 164 deletions

View file

@ -53,7 +53,10 @@ class SrsHybridServer : public ISrsFastTimer
{
private:
std::vector<ISrsHybridServer*> servers;
SrsFastTimer* timer_;
SrsFastTimer* timer20ms_;
SrsFastTimer* timer100ms_;
SrsFastTimer* timer1s_;
SrsFastTimer* timer5s_;
SrsClockWallMonitor* clock_monitor_;
public:
SrsHybridServer();
@ -66,10 +69,13 @@ public:
virtual void stop();
public:
virtual SrsServerAdapter* srs();
SrsFastTimer* timer();
SrsFastTimer* timer20ms();
SrsFastTimer* timer100ms();
SrsFastTimer* timer1s();
SrsFastTimer* timer5s();
// interface ISrsFastTimer
private:
srs_error_t on_timer(srs_utime_t interval, srs_utime_t tick);
srs_error_t on_timer(srs_utime_t interval);
};
extern SrsHybridServer* _srs_hybrid;