forked from gozfree/gear-lib
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlibtime.h
More file actions
46 lines (38 loc) · 827 Bytes
/
Copy pathlibtime.h
File metadata and controls
46 lines (38 loc) · 827 Bytes
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
35
36
37
38
39
40
41
42
43
44
45
46
/******************************************************************************
* Copyright (C) 2014-2015
* file: libtime.h
* author: gozfree <gozfree@163.com>
* created: 2016-05-21 17:28:20
* updated: 2016-05-21 17:28:20
*****************************************************************************/
#ifndef LIBTIME_H
#define LIBTIME_H
#include <stdint.h>
#include <time.h>
#ifdef __cplusplus
extern "C" {
#endif
/*
* accuracy second
*/
uint32_t time_get_sec();
char *time_get_sec_str();
/*
* accuracy milli second
*/
uint64_t time_get_msec();
char *time_get_msec_str(char *str, int len);
int time_sleep_ms(uint64_t ms);
/*
* accuracy micro second
*/
uint64_t time_get_usec();
/*
* accuracy nano second
*/
uint64_t time_get_nsec();
uint64_t time_get_nsec_bootup();
#ifdef __cplusplus
}
#endif
#endif