1 //******************************************************************
3 // Copyright 2015 Intel Mobile Communications GmbH All Rights Reserved.
5 //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
7 // Licensed under the Apache License, Version 2.0 (the "License");
8 // you may not use this file except in compliance with the License.
9 // You may obtain a copy of the License at
11 // http://www.apache.org/licenses/LICENSE-2.0
13 // Unless required by applicable law or agreed to in writing, software
14 // distributed under the License is distributed on an "AS IS" BASIS,
15 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 // See the License for the specific language governing permissions and
17 // limitations under the License.
19 //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
26 #define MS_PER_SEC (1000)
27 #define US_PER_SEC (1000000)
28 #define US_PER_MS (1000)
29 #define NS_PER_US (1000)
30 #define NS_PER_MS (1000000)
31 #define HNS_PER_US (10)
46 * If monotonic coarse/monotonic clock supported then gets current time as monotonic time
47 * in milliseconds or microseconds as the elapsed time since some unspecified starting point
48 * else gets current time in milliseconds or microseconds as the elapsed time since the epoch.
50 * For Arduino gets current time in milliseconds or microseconds since Arduino board begin
51 * running this program.
53 * @param precision based on this parameter, current time is returned in milliseconds or
56 * @warning This function may be sensitive to system time changes on some platforms.
59 * On Arduino platform:
60 * if the time precision is in milliseconds then the function will overflow
61 * (go back to 0) after approximately 50 days.
62 * if the time precision is in microseconds then the function will overflow
63 * (go back to 0) after approximately 70minutes.
66 * returns current time in milliseconds or microseconds.
68 uint64_t OICGetCurrentTime(OICTimePrecision precision);