mirror of
https://gitee.com/acl-dev/acl.git
synced 2024-12-02 03:47:53 +08:00
fixed one bug in thread_cond::wait there was one problem when computing timeout
This commit is contained in:
parent
919aabfa9c
commit
02719d7b6b
@ -1,6 +1,9 @@
|
||||
修改历史列表:
|
||||
|
||||
-----------------------------------------------------------------------
|
||||
512) 2018.3.20
|
||||
512.1) bugfix: thread_cond.cpp 中的方法 wait 内部计算时间有误
|
||||
|
||||
511) 2018.3.19
|
||||
511.1) feature: add redis_sentinel class
|
||||
|
||||
|
@ -90,7 +90,7 @@ bool thread_cond::wait(long long microseconds /* = -1 */)
|
||||
gettimeofday(&tv, NULL);
|
||||
|
||||
struct timespec ts;
|
||||
ts.tv_sec = (time_t) (tv.tv_sec + microseconds) / SEC_TO_MIS;
|
||||
ts.tv_sec = (time_t) (tv.tv_sec + microseconds / SEC_TO_MIS);
|
||||
long long n = (tv.tv_usec + microseconds % SEC_TO_MIS) * MIS_TO_NS;
|
||||
ts.tv_nsec = (long) n % SEC_TO_NS;
|
||||
ts.tv_sec += (long) n / SEC_TO_NS;
|
||||
|
@ -1,4 +1,4 @@
|
||||
%define release_id 87
|
||||
%define release_id 88
|
||||
|
||||
Summary: The powerful c/c++ library and server framework
|
||||
Name: acl-libs
|
||||
@ -135,6 +135,9 @@ fi
|
||||
|
||||
%changelog
|
||||
|
||||
* Mon Mar 20 2018 zhengshuxin@qiyi.com 3.3.0-88-20180320.10
|
||||
- fixed one bug in thread_cond::wait there was one problem when computing timeout
|
||||
|
||||
* Thu Mar 15 2018 zhengshuxin@qiyi.com 3.3.0-87-20180315.14
|
||||
- move acl-master.json from acl-master to acl-tools
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user