summaryrefslogtreecommitdiffstats
path: root/btif/src
diff options
context:
space:
mode:
Diffstat (limited to 'btif/src')
-rw-r--r--btif/src/btif_hf.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/btif/src/btif_hf.c b/btif/src/btif_hf.c
index bdaf69ec9..43707adfc 100644
--- a/btif/src/btif_hf.c
+++ b/btif/src/btif_hf.c
@@ -391,7 +391,7 @@ static int btif_hf_latest_connected_idx()
struct timespec now, conn_time_delta;
int latest_conn_idx = BTIF_HF_INVALID_IDX, i;
- time_now_timespec(&now);
+ clock_gettime(CLOCK_MONOTONIC, &now);
conn_time_delta.tv_sec = now.tv_sec;
for (i = 0; i < btif_max_hf_clients; i++)
@@ -555,7 +555,8 @@ static void btif_hf_upstreams_evt(UINT16 event, char* p_param)
break;
case BTA_AG_CONN_EVT:
- time_now_timespec(&btif_hf_cb[idx].connected_timestamp);
+ clock_gettime(CLOCK_MONOTONIC,
+ &btif_hf_cb[idx].connected_timestamp);
BTIF_TRACE_DEBUG("%s: BTA_AG_CONN_EVT, idx = %d ",
__FUNCTION__, idx);
btif_hf_cb[idx].peer_feat = p_data->conn.peer_feat;
@@ -1401,7 +1402,7 @@ static bt_status_t phone_state_change(int num_active, int num_held, bthf_call_st
(btif_hf_cb[idx].num_active) ||(btif_hf_cb[idx].num_held))
{
BTIF_TRACE_DEBUG("%s: Record call termination timestamp", __FUNCTION__);
- time_now_timespec(&btif_hf_cb[0].call_end_timestamp);
+ clock_gettime(CLOCK_MONOTONIC, &btif_hf_cb[0].call_end_timestamp);
}
BTA_AgResult (BTA_AG_HANDLE_ALL, BTA_AG_END_CALL_RES, NULL);
hf_idx = BTIF_HF_INVALID_IDX;
@@ -1646,7 +1647,7 @@ BOOLEAN btif_hf_call_terminated_recently()
{
struct timespec now;
- time_now_timespec(&now);
+ clock_gettime(CLOCK_MONOTONIC, &now);
if (now.tv_sec < btif_hf_cb[0].call_end_timestamp.tv_sec +
BTIF_HF_CALL_END_TIMEOUT)
{