Exemple #1
0
int CBOINCGUIApp::UpdateSystemIdleDetection() {
#ifdef __WXMSW__
    return get_idle_tick_count();
#else
    return TRUE;
#endif
}
Exemple #2
0
// Update the time since last input activity every 5 seconds or so.
//
DWORD WINAPI CBOINCTray::DataManagementProc() {
    while (true) {
        // On Vista systems, only elevated processes can create shared memory
        //   area's across various user sessions. In this case we need to wait
        //   for BOINC to create the shared memory area and then boinctray can
        //   successfully attach to it. What a PITA.
        if (!m_bIdleTrackerInitialized) {
            m_bIdleTrackerInitialized = attach_idle_monitor();
        }

        get_idle_tick_count();
        Sleep(5000);
    }
}