ndn-lite
uniform-time.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2019 Tianyuan Yu, Xinyu Ma
3  *
4  * This file is subject to the terms and conditions of the GNU Lesser
5  * General Public License v3.0. See the file LICENSE in the top level
6  * directory for more details.
7  */
8 
9 #ifndef UTIL_UNIFORM_TIME_H
10 #define UTIL_UNIFORM_TIME_H
11 
12 #include <stdint.h>
13 
14 #ifdef __cplusplus
15 extern "C" {
16 #endif
17 
29 typedef uint64_t ndn_time_ms_t;
30 
32 typedef uint64_t ndn_time_us_t;
33 
38 
43 
47 void ndn_time_delay(ndn_time_ms_t delay);
48 
51 #ifdef __cplusplus
52 } // extern "C"
53 #endif
54 
55 #endif // UTIL_UNIFORM_TIME_H
uint64_t ndn_time_us_t
Time count in micro-seconds.
Definition: uniform-time.h:32
ndn_time_us_t ndn_time_now_us(void)
Get current time count in us.
uint64_t ndn_time_ms_t
Time count in milli-seconds.
Definition: uniform-time.h:29
void ndn_time_delay(ndn_time_ms_t delay)
Sleep for a specified time interval.
ndn_time_ms_t ndn_time_now_ms(void)
Get current time count in ms.