blob: 55e7e6049125ba3de37eaa1080639b73d6075d9e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
/*
**********************************************************************************************
* File: time_help.h
* Description: api about time
* Authors: Liu WenTan <[email protected]>
* Date: 2022-07-15
* Copyright: (c) 2018-2022 Geedge Networks, Inc. All rights reserved.
***********************************************************************************************
*/
#ifndef _TIME_HELPER_H_
#define _TIME_HELPER_H_
#ifdef __cpluscplus
extern "C"
{
#endif
#include <time.h>
#include <stdint.h>
void get_current_timespec(struct timespec *tm);
int compare_timespec(struct timespec *left, struct timespec *right);
void copy_timespec(struct timespec *from, struct timespec *to);
uint64_t timespec_to_millisecond(const struct timespec* ts);
#ifdef __cpluscplus
}
#endif
#endif /* _TIME_HELPER_H_ */
|