Merge "hal: replace CLOCK_MONOTONIC with CLOCK_BOOTIME"

This commit is contained in:
Linux Build Service Account 2015-01-22 22:43:03 -08:00 committed by Gerrit - the friendly Code Review server
commit ca4688b303
1 changed files with 3 additions and 3 deletions

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2013 - 2014, The Linux Foundation. All rights reserved.
* Copyright (c) 2013 - 2015, The Linux Foundation. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
@ -141,7 +141,7 @@ static void spkr_prot_set_spkrstatus(bool enable)
handle.spkr_in_use = true;
else {
handle.spkr_in_use = false;
clock_gettime(CLOCK_MONOTONIC, &handle.spkr_last_time_used);
clock_gettime(CLOCK_BOOTTIME, &handle.spkr_last_time_used);
}
}
@ -181,7 +181,7 @@ static bool is_speaker_in_use(unsigned long *sec)
*sec = 0;
return true;
} else {
clock_gettime(CLOCK_MONOTONIC, &temp);
clock_gettime(CLOCK_BOOTTIME, &temp);
*sec = temp.tv_sec - handle.spkr_last_time_used.tv_sec;
return false;
}