Sign in
fuchsia
/
fuchsia
/
refs/heads/releases/canary
/
.
/
zircon
/
third_party
/
ulib
/
musl
/
src
/
time
/
time.c
blob: c32996493484490710464c085e67867fcb60fcdb [
file
] [
log
] [
blame
]
#include
<time.h>
#include
"threads_impl.h"
time_t
time
(
time_t
*
t
)
{
struct
timespec ts
;
if
(
__clock_gettime
(
CLOCK_REALTIME
,
&
ts
)
<
0
)
{
return
-
1
;
}
if
(
t
)
*
t
=
ts
.
tv_sec
;
return
ts
.
tv_sec
;
}