diff --git a/trunk/src/app/srs_app_bandwidth.cpp b/trunk/src/app/srs_app_bandwidth.cpp index c7963fe9b..3981a6ccc 100644 --- a/trunk/src/app/srs_app_bandwidth.cpp +++ b/trunk/src/app/srs_app_bandwidth.cpp @@ -260,7 +260,7 @@ srs_error_t SrsBandwidth::play_checking(SrsBandwidthSample* sample, SrsKbpsLimit int data_count = 1; srs_utime_t starttime = srs_update_system_time(); - while (srsu2ms(srs_get_system_time() - starttime) < sample->duration_ms) { + while (int64_t(srsu2ms(srs_get_system_time() - starttime)) < sample->duration_ms) { srs_usleep(sample->interval_ms * SRS_UTIME_MILLISECONDS); // TODO: FIXME: use shared ptr message. @@ -342,7 +342,7 @@ srs_error_t SrsBandwidth::publish_checking(SrsBandwidthSample* sample, SrsKbpsLi // recv publish msgs until @duration_ms ms srs_utime_t starttime = srs_update_system_time(); - while (srsu2ms(srs_get_system_time() - starttime) < sample->duration_ms) { + while (int64_t(srsu2ms(srs_get_system_time() - starttime)) < sample->duration_ms) { SrsCommonMessage* msg = NULL; SrsBandwidthPacket* pkt = NULL; if ((err = _rtmp->expect_message(&msg, &pkt)) != srs_success) { diff --git a/trunk/src/kernel/srs_kernel_utility.cpp b/trunk/src/kernel/srs_kernel_utility.cpp index 5dce8fd38..808370178 100644 --- a/trunk/src/kernel/srs_kernel_utility.cpp +++ b/trunk/src/kernel/srs_kernel_utility.cpp @@ -113,7 +113,7 @@ srs_utime_t srs_get_system_time() return _srs_system_time_us_cache; } -srs_utime_t srs_get_system_startup_time_ms() +srs_utime_t srs_get_system_startup_time() { if (_srs_system_time_startup_time <= 0) { srs_update_system_time(); diff --git a/trunk/src/kernel/srs_kernel_utility.hpp b/trunk/src/kernel/srs_kernel_utility.hpp index f0ddf8662..2c4d31f16 100644 --- a/trunk/src/kernel/srs_kernel_utility.hpp +++ b/trunk/src/kernel/srs_kernel_utility.hpp @@ -44,7 +44,7 @@ extern srs_error_t srs_avc_nalu_read_bit(SrsBitBuffer* stream, int8_t& v); // get current system time in srs_utime_t, use cache to avoid performance problem extern srs_utime_t srs_get_system_time(); -extern srs_utime_t srs_get_system_startup_time_ms(); +extern srs_utime_t srs_get_system_startup_time(); // the deamon st-thread will update it. extern srs_utime_t srs_update_system_time(); diff --git a/trunk/src/libs/srs_lib_bandwidth.cpp b/trunk/src/libs/srs_lib_bandwidth.cpp index 3ef379d6b..757912e7e 100644 --- a/trunk/src/libs/srs_lib_bandwidth.cpp +++ b/trunk/src/libs/srs_lib_bandwidth.cpp @@ -312,7 +312,7 @@ int SrsBandwidthClient::publish_checking(int duration_ms, int play_kbps) int data_count = 1; int64_t starttime = srsu2ms(srs_update_system_time()); - while ((srsu2ms(srs_get_system_time()) - starttime) < duration_ms) { + while (int64_t(srsu2ms(srs_get_system_time()) - starttime) < duration_ms) { // TODO: FIXME: use shared ptr message. SrsBandwidthPacket* pkt = SrsBandwidthPacket::create_publishing();