FreeNOS
time.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2009 Niek Linnenbank
3  *
4  * This program is free software: you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation, either version 3 of the License, or
7  * (at your option) any later version.
8  *
9  * This program 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
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program. If not, see <http://www.gnu.org/licenses/>.
16  */
17 
18 #ifndef __LIB_LIBPOSIX_TIME_H
19 #define __LIB_LIBPOSIX_TIME_H
20 
21 #include <Macros.h>
22 #include "sys/types.h"
23 
35 struct timespec
36 {
39 
41  long tv_nsec;
42 };
43 
58 extern C unsigned long mktime(const unsigned int year, const unsigned int month,
59  const unsigned int day, const unsigned int hour,
60  const unsigned int min, const unsigned int sec);
66 #endif /* __LIB_LIBPOSIX_TIME_H */
Macros.h
types.h
mktime
C unsigned long mktime(const unsigned int year, const unsigned int month, const unsigned int day, const unsigned int hour, const unsigned int min, const unsigned int sec)
Convert given time values to UNIX timestamp (seconds since epoch)
Definition: time.cpp:20
timespec::tv_nsec
long tv_nsec
Nanoseconds.
Definition: time.h:41
time_t
u64 time_t
Used for time in seconds.
Definition: types.h:68
timespec::tv_sec
time_t tv_sec
Seconds.
Definition: time.h:38
C
#define C
Used to define external C functions.
Definition: Macros.h:134
timespec
The <time.h> header shall declare the timespec structure.
Definition: time.h:35