mirror of
https://github.com/valitydev/osquery-1.git
synced 2024-11-07 18:08:53 +00:00
Uptime implementation on Windows (#2906)
This commit is contained in:
parent
57a6a9441e
commit
762e31a001
@ -16,6 +16,8 @@
|
||||
#include <sys/sysctl.h>
|
||||
#elif defined(__linux__)
|
||||
#include <sys/sysinfo.h>
|
||||
#elif defined(WIN32)
|
||||
#include <windows.h>
|
||||
#endif
|
||||
|
||||
namespace osquery {
|
||||
@ -43,6 +45,8 @@ long getUptime() {
|
||||
}
|
||||
|
||||
return sys_info.uptime;
|
||||
#elif defined(WIN32)
|
||||
return (long)GetTickCount64() / 1000;
|
||||
#endif
|
||||
|
||||
return -1;
|
||||
|
Loading…
Reference in New Issue
Block a user