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)
45 * If monotonic coarse/monotonic clock supported then gets current time as monotonic time
46 * in milliseconds or microseconds as the elapsed time since some unspecified starting point
47 * else gets current time in milliseconds or microseconds as the elapsed time since the epoch.
49 * For Arduino gets current time in milliseconds or microseconds since Arduino board begin
50 * running this program.
52 * @param precision based on this parameter, current time is returned in milliseconds or
56 * On Arduino platform:
57 * if the time precision is in milliseconds then the function will overflow
58 * (go back to 0) after approximately 50 days.
59 * if the time precision is in microseconds then the function will overflow
60 * (go back to 0) after approximately 70minutes.
63 * returns current time in milliseconds or microseconds.
65 uint64_t OICGetCurrentTime(OICTimePrecision precision);