FreeNOS
Main Page
Related Pages
Modules
Namespaces
Namespace List
Namespace Members
All
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
u
w
Functions
Typedefs
Enumerations
Enumerator
a
b
c
d
e
f
g
h
i
m
n
o
p
r
s
t
u
w
Data Structures
Data Structures
Class Hierarchy
Data Fields
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
~
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
~
Variables
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
Typedefs
a
f
h
i
m
n
o
p
r
s
Enumerations
a
b
c
d
e
f
h
i
l
m
n
o
p
r
s
t
u
Enumerator
a
b
c
d
e
f
g
i
k
l
m
n
o
p
r
s
t
u
v
w
Related Functions
Files
File List
Globals
All
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Functions
_
a
b
c
d
e
f
g
h
i
k
l
m
o
p
r
s
t
u
v
w
Variables
_
a
c
d
e
f
g
h
i
k
l
m
p
r
s
t
u
v
x
Typedefs
_
a
b
c
d
e
f
g
i
l
m
n
o
p
r
s
t
u
v
Enumerations
Enumerator
a
b
c
d
e
g
i
k
l
m
p
r
s
u
w
Macros
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
y
z
lib
libposix
time
time.cpp
Go to the documentation of this file.
1
18
#include <time.h>
19
20
unsigned
long
mktime
(
const
unsigned
int
year,
const
unsigned
int
month,
21
const
unsigned
int
day,
const
unsigned
int
hour,
22
const
unsigned
int
min,
const
unsigned
int
sec)
23
{
24
unsigned
int
monthVal = month, yearVal = year;
25
26
// 1..12 -> 11,12,1..10
27
if
( 0 >= (
int
) (monthVal -= 2))
28
{
29
monthVal += 12;
// Puts Feb last since it has leap day
30
yearVal -= 1;
31
}
32
33
return
((((
unsigned
long
)
34
(yearVal/4 - yearVal/100 + yearVal/400 + 367*monthVal/12 + day) +
35
yearVal*365 - 719499
36
)*24 + hour
// now have hours
37
)*60 + min
// now have minutes
38
)*60 + sec;
// finally seconds
39
}
mktime
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)
Copyright (C) 2009 Coen Bijlsma.
Definition:
time.cpp:20
Generated by
1.8.17