ROHC compression/decompression library
rohc_time.h
Go to the documentation of this file.
1 /*
2  * Copyright 2013,2014 Didier Barvaux
3  *
4  * This library is free software; you can redistribute it and/or
5  * modify it under the terms of the GNU Lesser General Public
6  * License as published by the Free Software Foundation; either
7  * version 2.1 of the License, or (at your option) any later version.
8  *
9  * This library is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12  * Lesser General Public License for more details.
13  *
14  * You should have received a copy of the GNU Lesser General Public
15  * License along with this library; if not, write to the Free Software
16  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
17  */
18 
19 /**
20  * @file rohc_time.h
21  * @brief ROHC public definitions related to time
22  * @author Didier Barvaux <didier@barvaux.org>
23  */
24 
25 #ifndef ROHC_TIME_H
26 #define ROHC_TIME_H
27 
28 #ifdef __cplusplus
29 extern "C"
30 {
31 #endif
32 
33 #include <stdint.h>
34 
35 
36 /**
37  * @brief A timestamp for the ROHC library
38  *
39  * Could be easily created from \e struct \e timespec on UNIX:
40  * \code
41  struct rohc_ts rohc_ts;
42  struct timespec unix_ts;
43  ...
44  rohc_ts.sec = unix_ts.tv_sec;
45  rohc_ts.nsec = unix_ts.tv_nsec;
46  ...
47 \endcode
48  *
49  * @ingroup rohc
50  */
51 struct rohc_ts
52 {
53  uint64_t sec; /**< The seconds part of the timestamp */
54  uint64_t nsec; /**< The nanoseconds part of the timestamp */
55 };
56 
57 #ifdef __cplusplus
58 }
59 #endif
60 
61 #endif /* ROHC_TIME_H */
62 
A timestamp for the ROHC library.
Definition: rohc_time.h:51
uint64_t sec
Definition: rohc_time.h:53
uint64_t nsec
Definition: rohc_time.h:54