Correct watchdog timeout
am: bfef9c5748
Change-Id: I07c5d81ba1289381a12b54a944c206c1845a21d0
This commit is contained in:
@@ -956,7 +956,7 @@ class WatchDog {
|
|||||||
pthread_mutex_lock(&mutex_);
|
pthread_mutex_lock(&mutex_);
|
||||||
struct timespec time_to_giveup;
|
struct timespec time_to_giveup;
|
||||||
clock_gettime(CLOCK_REALTIME, &time_to_giveup);
|
clock_gettime(CLOCK_REALTIME, &time_to_giveup);
|
||||||
time_to_giveup.tv_sec += 2; // wait 2 seconds.
|
time_to_giveup.tv_sec += 5; // wait 5 seconds.
|
||||||
if (running_) {
|
if (running_) {
|
||||||
pthread_cond_timedwait(&condition_, &mutex_, &time_to_giveup);
|
pthread_cond_timedwait(&condition_, &mutex_, &time_to_giveup);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user