#include <stdio.h>
#include <windows.h>
#include <tchar.h>
Go to the source code of this file.
◆ WIN32_LEAN_AND_MEAN
◆ main()
Definition at line 6 of file uptime.c.
7{
10
12
15 {
18 LONGLONG Hours = ((TotalSecs % 86400) / 3600);
19 LONGLONG Mins = ((TotalSecs % 86400) % 3600) / 60;
20 LONGLONG Secs = ((TotalSecs % 86400) % 3600) % 60;
21
22#ifdef LINUX_OUTPUT
25 _tprintf(
_T(
"up %I64u days, %I64u:%I64u\n"), Days, Hours, Mins);
26#else
27 _tprintf(
_T(
"System Up Time:\t\t%I64u days, %I64u Hours, %I64u Minutes, %.2I64u Seconds\n"),
28 Days, Hours, Mins, Secs);
29#endif
30 return 0;
31 }
32
33 return -1;
34}
BOOL WINAPI QueryPerformanceFrequency(OUT PLARGE_INTEGER lpFrequency)
BOOL WINAPI QueryPerformanceCounter(OUT PLARGE_INTEGER lpPerformanceCount)
VOID WINAPI GetLocalTime(OUT LPSYSTEMTIME lpSystemTime)
#define UNREFERENCED_PARAMETER(P)