Mistake on this page? Email us
edge_time.h
Go to the documentation of this file.
1 /*
2  * ----------------------------------------------------------------------------
3  * Copyright 2018 ARM Ltd.
4  *
5  * SPDX-License-Identifier: Apache-2.0
6  *
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
10  *
11  * http://www.apache.org/licenses/LICENSE-2.0
12  *
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.
18  * ----------------------------------------------------------------------------
19  */
20 
21 #ifndef EDGE_TIME_H
22 #define EDGE_TIME_H
23 
24 #include <stdint.h>
25 #include <stdbool.h>
26 
45 
52 bool edgetime_get_real_in_ns(uint64_t *seconds, uint64_t *ns);
53 
59 #endif
bool edgetime_get_real_in_ns(uint64_t *seconds, uint64_t *ns)
Get the real time in seconds and nanoseconds. Uses CLOCK_REAL as source.
uint64_t edgetime_get_monotonic_in_ms()
Get current milliseconds. Uses CLOCK_MONOTONIC as source from POSIX.1-2001, POSIX.1-2008, SUSv2 compliant system. If _POSIX_MONOTONIC_CLOCK is not defined the function returns 0.