|
16 | 16 |
|
17 | 17 | // Make lines shorter |
18 | 18 | using Clock = std::chrono::high_resolution_clock; |
19 | | -using TimePoint = std::chrono::time_point<Clock>; |
| 19 | +using Time_Point = std::chrono::time_point<Clock>; |
20 | 20 |
|
21 | 21 | namespace { |
22 | 22 | // Maximum amount of time in iterations to wait for bootstrapping and friend |
@@ -222,9 +222,9 @@ class AV_State { |
222 | 222 | ck_assert(state != TOXAV_FRIEND_CALL_STATE_ERROR); |
223 | 223 | std::cout << "[" << me->name_ << "] State changed to: " << std::to_string(state) << std::endl; |
224 | 224 | me->call_state_.store(state); |
225 | | - TimePoint tp = me->call_start_.load(); |
| 225 | + Time_Point tp = me->call_start_.load(); |
226 | 226 |
|
227 | | - if (state != TOXAV_FRIEND_CALL_STATE_NONE && tp == TimePoint()) { |
| 227 | + if (state != TOXAV_FRIEND_CALL_STATE_NONE && tp == Time_Point()) { |
228 | 228 | me->call_start_.store(Clock::now()); |
229 | 229 | me->in_call_.store(true); |
230 | 230 | } |
@@ -287,14 +287,14 @@ class AV_State { |
287 | 287 |
|
288 | 288 | if (in_call_.load()) { |
289 | 289 | uint32_t state = call_state_.load(); |
290 | | - TimePoint tp = call_start_.load(); |
| 290 | + Time_Point tp = call_start_.load(); |
291 | 291 | std::chrono::duration<double> call_time = Clock::now() - tp; |
292 | 292 |
|
293 | 293 | if (state == TOXAV_FRIEND_CALL_STATE_FINISHED) { |
294 | 294 | std::cout << "[" << name_ << "] Call ended by other side after: " << call_time.count() |
295 | 295 | << "s" << std::endl; |
296 | 296 | in_call_.store(false); |
297 | | - } else if (tp > TimePoint() && call_time > AV_State::AUTO_HANGUP_TIME) { |
| 297 | + } else if (tp > Time_Point() && call_time > AV_State::AUTO_HANGUP_TIME) { |
298 | 298 | std::cout << "[" << name_ << "] Ending call after: " << call_time.count() << "s" |
299 | 299 | << std::endl; |
300 | 300 | Toxav_Err_Call_Control cc_err; |
@@ -355,7 +355,7 @@ class AV_State { |
355 | 355 | std::atomic_bool incomming_; |
356 | 356 | std::atomic_uint32_t call_state_; |
357 | 357 |
|
358 | | - std::atomic<TimePoint> call_start_; |
| 358 | + std::atomic<Time_Point> call_start_; |
359 | 359 | std::atomic_bool in_call_; |
360 | 360 |
|
361 | 361 | std::atomic_bool video_received_; |
|
0 commit comments