Reduce time of timer_test; use unique_lock instead of guard

This commit is contained in:
Xavier Arteaga 2020-01-26 19:30:03 +01:00 committed by Andre Puschmann
parent 22da8dfbb1
commit e0cc1fd697
2 changed files with 2 additions and 2 deletions

View File

@ -100,7 +100,7 @@ class timer_handler
void run()
{
std::lock_guard<std::mutex> lock(parent->mutex);
std::unique_lock<std::mutex> lock(parent->mutex);
if (not active) {
ERROR("Error: calling run() for inactive timer id=%d\n", id());
return;

View File

@ -199,7 +199,7 @@ int timers2_test3()
static std::vector<timer_handler::unique_timer> timers2_test4_t;
static srslte::tti_sync_cv timers2_test4_tti_sync1;
static srslte::tti_sync_cv timers2_test4_tti_sync2;
static uint32_t duration = 10000;
static uint32_t duration = 1000;
static void timers2_test4_thread()
{