30 namespace load_reporter {
34 uint64_t FiletimeToInt(
const FILETIME& ft) {
36 i.LowPart = ft.dwLowDateTime;
37 i.HighPart = ft.dwHighDateTime;
45 FILETIME
idle, kernel, user;
46 if (GetSystemTimes(&
idle, &kernel, &user) != 0) {
47 total = FiletimeToInt(kernel) + FiletimeToInt(user);
50 return std::make_pair(busy,
total);