Commit 22e14ab6 authored by zhujiashun's avatar zhujiashun

unify clock_gettime in test/bthread_timer_thread_unittest.cpp

parent 483f53e4
...@@ -34,11 +34,7 @@ public: ...@@ -34,11 +34,7 @@ public:
void run() void run()
{ {
timespec current_time; timespec current_time;
#if defined(OS_MACOSX)
clock_gettime(CALENDAR_CLOCK, &current_time);
#else
clock_gettime(CLOCK_REALTIME, &current_time); clock_gettime(CLOCK_REALTIME, &current_time);
#endif
if (_name) { if (_name) {
LOG(INFO) << "Run `" << _name << "' task_id=" << _task_id; LOG(INFO) << "Run `" << _name << "' task_id=" << _task_id;
} else { } else {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment