diff --git a/api/boinc_api.C b/api/boinc_api.C
index 60d7d68a00..5b8770047f 100644
--- a/api/boinc_api.C
+++ b/api/boinc_api.C
@@ -91,7 +91,6 @@ static FILE_LOCK file_lock;
APP_CLIENT_SHM* app_client_shm = 0;
static volatile int time_until_checkpoint;
// time until enable checkpoint
-static volatile int time_until_fraction_done_update;
// time until report fraction done to core client
static volatile double fraction_done;
static volatile double last_checkpoint_cpu_time;
@@ -376,7 +375,6 @@ int boinc_init_options_general(BOINC_OPTIONS& opt) {
fraction_done = -1;
time_until_checkpoint = (int)aid.checkpoint_period;
last_checkpoint_cpu_time = aid.wu_cpu_time;
- time_until_fraction_done_update = (int)aid.fraction_done_update_period;
last_wu_cpu_time = aid.wu_cpu_time;
if (standalone) {
@@ -514,7 +512,6 @@ int boinc_parse_init_data_file() {
aid.host_total_credit = 0;
aid.host_expavg_credit = 0;
aid.checkpoint_period = DEFAULT_CHECKPOINT_PERIOD;
- aid.fraction_done_update_period = DEFAULT_FRACTION_DONE_UPDATE_PERIOD;
if (!boinc_file_exists(INIT_DATA_FILE)) {
fprintf(stderr,
@@ -598,13 +595,14 @@ int resume_activities() {
#endif
return 0;
}
+
int restore_activities() {
int retval;
if (boinc_status.suspended) {
- retval = suspend_activities();
- } else {
- retval = resume_activities();
- }
+ retval = suspend_activities();
+ } else {
+ retval = resume_activities();
+ }
return retval;
}
@@ -883,18 +881,14 @@ static void timer_handler() {
// don't bother reporting CPU time etc. if we're suspended
//
if (options.send_status_msgs && !boinc_status.suspended) {
- time_until_fraction_done_update -= 1;
- if (time_until_fraction_done_update <= 0) {
- double cur_cpu;
- cur_cpu = boinc_worker_thread_cpu_time();
- last_wu_cpu_time = cur_cpu + initial_wu_cpu_time;
- update_app_progress(last_wu_cpu_time, last_checkpoint_cpu_time);
- time_until_fraction_done_update = (int)aid.fraction_done_update_period;
- }
+ double cur_cpu = boinc_worker_thread_cpu_time();
+ last_wu_cpu_time = cur_cpu + initial_wu_cpu_time;
+ update_app_progress(last_wu_cpu_time, last_checkpoint_cpu_time);
}
- // If running under V5 client, notify the client if the graphics app
- // exits (e.g., if user clicked in the graphics window's close box.)
+ // If running under V5 client, notify the client if the graphics app exits
+ // (e.g., if user clicked in the graphics window's close box.)
+ //
if (ga_win.pid) {
if (! ga_win.is_running()) {
app_client_shm->shm->graphics_reply.send_msg(
diff --git a/checkin_notes b/checkin_notes
index 550a6f2743..6f949244a3 100644
--- a/checkin_notes
+++ b/checkin_notes
@@ -4831,3 +4831,14 @@ David 13 June 2008
html/user/
create_profile.php
+
+David 13 June 2008
+ - API/runtime system: remove "fraction done update period" stuff.
+ This was always 1 second, which is fine.
+
+ api/
+ boinc_api.C
+ client/
+ app_start.C
+ lib/
+ app_ipc.C,h
diff --git a/client/app_start.C b/client/app_start.C
index b0ef31d374..ab987b00ab 100644
--- a/client/app_start.C
+++ b/client/app_start.C
@@ -187,7 +187,6 @@ int ACTIVE_TASK::write_app_init_file() {
aid.rsc_memory_bound = wup->rsc_memory_bound;
aid.rsc_disk_bound = wup->rsc_disk_bound;
aid.checkpoint_period = gstate.global_prefs.disk_interval;
- aid.fraction_done_update_period = DEFAULT_FRACTION_DONE_UPDATE_PERIOD;
aid.fraction_done_start = 0;
aid.fraction_done_end = 1;
#ifdef _WIN32
diff --git a/lib/app_ipc.C b/lib/app_ipc.C
index d922324926..1cf065599f 100644
--- a/lib/app_ipc.C
+++ b/lib/app_ipc.C
@@ -137,7 +137,6 @@ int write_init_data_file(FILE* f, APP_INIT_DATA& ai) {
"%f\n"
"%f\n"
"%f\n"
- "%f\n"
"%f\n"
"%f\n"
"%f\n"
@@ -152,7 +151,6 @@ int write_init_data_file(FILE* f, APP_INIT_DATA& ai) {
ai.host_expavg_credit,
ai.resource_share_fraction,
ai.checkpoint_period,
- ai.fraction_done_update_period,
ai.fraction_done_start,
ai.fraction_done_end,
ai.rsc_fpops_est,
@@ -246,7 +244,6 @@ int parse_init_data_file(FILE* f, APP_INIT_DATA& ai) {
if (xp.parse_double(tag, "rsc_disk_bound", ai.rsc_disk_bound)) continue;
if (xp.parse_double(tag, "wu_cpu_time", ai.wu_cpu_time)) continue;
if (xp.parse_double(tag, "checkpoint_period", ai.checkpoint_period)) continue;
- if (xp.parse_double(tag, "fraction_done_update_period", ai.fraction_done_update_period)) continue;
if (xp.parse_double(tag, "fraction_done_start", ai.fraction_done_start)) continue;
if (xp.parse_double(tag, "fraction_done_end", ai.fraction_done_end)) continue;
xp.skip_unexpected(tag, true, "parse_init_data_file");
diff --git a/lib/app_ipc.h b/lib/app_ipc.h
index d4d24b297d..d4ff15c36e 100644
--- a/lib/app_ipc.h
+++ b/lib/app_ipc.h
@@ -113,7 +113,6 @@ struct MSG_QUEUE {
bool timeout(double);
};
-#define DEFAULT_FRACTION_DONE_UPDATE_PERIOD 1
#define DEFAULT_CHECKPOINT_PERIOD 300
#define SHM_PREFIX "shm_"
@@ -191,7 +190,6 @@ struct APP_INIT_DATA {
double checkpoint_period; // recommended checkpoint period
SHMEM_SEG_NAME shmem_seg_name;
double wu_cpu_time; // cpu time from previous episodes
- double fraction_done_update_period;
APP_INIT_DATA();
APP_INIT_DATA(const APP_INIT_DATA&); // copy constructor