repo.or.cz
/
jack2.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
Merge branch 'master' into develop
[jack2.git]
/
linux
/
uptime.c
blob
d6e6c9d5f04ef2ed584194a2a36ba581c133e30d
1
#include <sys/sysinfo.h>
2
3
long
uptime
(
void
) {
4
struct
sysinfo si
;
5
6
if
(
sysinfo
(&
si
) !=
0
)
7
{
8
return
-
1
;
9
}
10
11
return
si
.
uptime
;
12
}