diff options
Diffstat (limited to 'procps')
-rw-r--r-- | procps/ps.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/procps/ps.c b/procps/ps.c index de062fe8b..4e6dc1ef9 100644 --- a/procps/ps.c +++ b/procps/ps.c | |||
@@ -125,7 +125,9 @@ static unsigned long get_uptime(void) | |||
125 | if (sysinfo(&info) < 0) | 125 | if (sysinfo(&info) < 0) |
126 | return 0; | 126 | return 0; |
127 | return info.uptime; | 127 | return info.uptime; |
128 | #elif !ENABLE_PLATFORM_MINGW32 | 128 | #elif ENABLE_PLATFORM_MINGW32 |
129 | return GetTickCount64()/1000; | ||
130 | #elif 1 | ||
129 | unsigned long uptime; | 131 | unsigned long uptime; |
130 | char buf[sizeof(uptime)*3 + 2]; | 132 | char buf[sizeof(uptime)*3 + 2]; |
131 | /* /proc/uptime is "UPTIME_SEC.NN IDLE_SEC.NN\n" | 133 | /* /proc/uptime is "UPTIME_SEC.NN IDLE_SEC.NN\n" |
@@ -136,8 +138,6 @@ static unsigned long get_uptime(void) | |||
136 | buf[sizeof(buf)-1] = '\0'; | 138 | buf[sizeof(buf)-1] = '\0'; |
137 | sscanf(buf, "%lu", &uptime); | 139 | sscanf(buf, "%lu", &uptime); |
138 | return uptime; | 140 | return uptime; |
139 | #elif ENABLE_PLATFORM_MINGW32 | ||
140 | return GetTickCount64()/1000; | ||
141 | #else | 141 | #else |
142 | struct timespec ts; | 142 | struct timespec ts; |
143 | if (clock_gettime(CLOCK_MONOTONIC, &ts) < 0) | 143 | if (clock_gettime(CLOCK_MONOTONIC, &ts) < 0) |