mirror of https://github.com/BOINC/boinc.git
core and app suspend/resume/quit functionality
svn path=/trunk/boinc/; revision=639
This commit is contained in:
parent
1cdfefcb36
commit
932be41e41
|
@ -230,7 +230,7 @@ void boinc_catch_signal(int signal) {
|
|||
}
|
||||
|
||||
int boinc_finish(int status) {
|
||||
last_checkpoint_cpu_time = boinc_cpu_time();
|
||||
last_checkpoint_cpu_time = boinc_cpu_time();
|
||||
write_fraction_done_file(fraction_done,last_checkpoint_cpu_time,last_checkpoint_cpu_time);
|
||||
#ifdef _WIN32
|
||||
// Stop the timer
|
||||
|
@ -310,7 +310,7 @@ bool boinc_time_to_checkpoint() {
|
|||
}
|
||||
|
||||
int boinc_checkpoint_completed() {
|
||||
last_checkpoint_cpu_time = boinc_cpu_time();
|
||||
last_checkpoint_cpu_time = boinc_cpu_time();
|
||||
write_fraction_done_file(fraction_done,last_checkpoint_cpu_time,last_checkpoint_cpu_time);
|
||||
ready_to_checkpoint = false;
|
||||
time_until_checkpoint = aid.checkpoint_period;
|
||||
|
@ -325,6 +325,13 @@ int boinc_checkpoint_completed() {
|
|||
boinc_finish(ERR_QUIT_REQUEST);
|
||||
}
|
||||
boinc_sleep(1); // Should this be a smaller value?
|
||||
FILE* f = fopen(SUSPEND_QUIT_FILE, "r");
|
||||
if(f) {
|
||||
parse_suspend_quit_file(f,time_to_suspend,time_to_quit);
|
||||
fclose(f);
|
||||
} else {
|
||||
time_to_suspend = time_to_quit = false;
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
@ -555,10 +562,10 @@ int write_fraction_done_file(double pct, double cpu, double checkpoint_cpu) {
|
|||
"<checkpoint_cpu_time>%f</checkpoint_cpu_time>\n",
|
||||
pct,
|
||||
cpu,
|
||||
checkpoint_cpu
|
||||
checkpoint_cpu
|
||||
);
|
||||
|
||||
fclose(f);
|
||||
fclose(f);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -2401,3 +2401,40 @@ Eric Nov 12, 2002
|
|||
upper_case.C
|
||||
Makefile.in
|
||||
|
||||
Eric Nov 14, 2002
|
||||
- windows screensaver module
|
||||
|
||||
api/
|
||||
boinc_api.C
|
||||
graphics_api.C
|
||||
windows_opengl.cpp
|
||||
client/
|
||||
win/
|
||||
win_screensaver.cpp (added)
|
||||
win_build/
|
||||
boinc.dsw
|
||||
boinc_ss/ (added)
|
||||
boinc_ss.dsp (added)
|
||||
|
||||
Seth/Eric Nov 18, 2002
|
||||
- windows idle detection
|
||||
- Communication to app for suspend/resume/quit
|
||||
|
||||
api/
|
||||
boinc_api.C,h
|
||||
windows_opengl.cpp
|
||||
client/
|
||||
app.C
|
||||
client_state.C,h
|
||||
prefs.C,h
|
||||
win/
|
||||
win_screensaver.cpp
|
||||
wingui.cpp,h
|
||||
win_idle_tracker.cpp,h,def (added)
|
||||
win_build/
|
||||
boinc.dsw
|
||||
boinc_dll/ (added)
|
||||
boinc_dll.dsp (added)
|
||||
boinc_gui/
|
||||
boinc_gui.dsp
|
||||
|
||||
|
|
Loading…
Reference in New Issue