summaryrefslogtreecommitdiff
path: root/utils/loc_timer.h
diff options
context:
space:
mode:
authorKevin Tang <zhikait@codeaurora.org>2013-07-03 22:22:26 -0700
committerKevin Tang <zhikait@codeaurora.org>2013-11-26 12:07:02 -0800
commit0eeb1392f1552cfa7bb3e554246adb1d4e61dc5b (patch)
treec04e1084c2c3d21b5c9a34d8bb9d9ebc43f1d654 /utils/loc_timer.h
parent8557c7afdf353e6d34d2e5cb9b65fe46f8c6d222 (diff)
downloadgps-0eeb1392f1552cfa7bb3e554246adb1d4e61dc5b.tar.gz
added timer stop api
loc_timer util currently can not be stopped. Added stop api so that clients can make use of. CRs-Fixed: 579624 Change-Id: I17f80e46ecfbdf1b70eb158f1ee7eb1a92d5e765
Diffstat (limited to 'utils/loc_timer.h')
-rw-r--r--utils/loc_timer.h17
1 files changed, 13 insertions, 4 deletions
diff --git a/utils/loc_timer.h b/utils/loc_timer.h
index 213da20..0034d27 100644
--- a/utils/loc_timer.h
+++ b/utils/loc_timer.h
@@ -43,10 +43,19 @@ extern "C" {
*/
typedef void(*loc_timer_callback)(void *user_data, int result);
-//int loc_timer_start(loc_timer_client_data *p_thread);
-int loc_timer_start(unsigned int delay_msec,
- loc_timer_callback,
- void* user_data);
+
+/*
+ Returns the handle, which can be used to stop the timer
+*/
+void* loc_timer_start(unsigned int delay_msec,
+ loc_timer_callback,
+ void* user_data);
+
+/*
+ handle becomes invalid upon the return of the callback
+*/
+void loc_timer_stop(void* handle);
+
#ifdef __cplusplus
}
#endif /* __cplusplus */