repo.or.cz
/
haiku.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
headers/bsd: Add sys/queue.h.
[haiku.git]
/
src
/
system
/
libroot
/
posix
/
time
/
stime.c
blob
fc8a8e17b4817b7e0809355d61f2e2af7b2be9d1
1
/*
2
** Copyright 2004, Jérôme Duval. All rights reserved.
3
** Distributed under the terms of the Haiku License.
4
*/
5
6
#include <time.h>
7
#include <errno.h>
8
#include
"syscalls.h"
9
10
#include <errno_private.h>
11
12
13
int
14
stime
(
const time_t
*
tp
)
15
{
16
status_t status
;
17
18
if
(
tp
==
NULL
) {
19
__set_errno
(
EINVAL
);
20
return
-
1
;
21
}
22
23
status
=
_kern_set_real_time_clock
((
bigtime_t
)*
tp
*
1000000
);
24
if
(
status
<
B_OK
) {
25
__set_errno
(
status
);
26
return
-
1
;
27
}
28
return
0
;
29
}
30