mirror of https://github.com/BOINC/boinc.git
Timer initialized in boinc_init instead of by application.
svn path=/trunk/boinc/; revision=129
This commit is contained in:
parent
07c83375dc
commit
157187bfbd
|
@ -103,12 +103,14 @@ void write_core_file(FILE* f, APP_IN& ai) {
|
||||||
"<graphics_refresh_period>%f</graphics_refresh_period>\n"
|
"<graphics_refresh_period>%f</graphics_refresh_period>\n"
|
||||||
"<checkpoint_period>%f</checkpoint_period>\n"
|
"<checkpoint_period>%f</checkpoint_period>\n"
|
||||||
"<poll_period>%f</poll_period>\n"
|
"<poll_period>%f</poll_period>\n"
|
||||||
|
"<checkpoint_period>%f</checkpoint_period>\n"
|
||||||
"<cpu_time>%f</cpu_time>\n",
|
"<cpu_time>%f</cpu_time>\n",
|
||||||
ai.graphics.xsize,
|
ai.graphics.xsize,
|
||||||
ai.graphics.ysize,
|
ai.graphics.ysize,
|
||||||
ai.graphics.refresh_period,
|
ai.graphics.refresh_period,
|
||||||
ai.checkpoint_period,
|
ai.checkpoint_period,
|
||||||
ai.poll_period,
|
ai.poll_period,
|
||||||
|
ai.checkpoint_period,
|
||||||
ai.cpu_time
|
ai.cpu_time
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -130,6 +132,7 @@ void parse_core_file(FILE* f, APP_IN& ai) {
|
||||||
else if (parse_double(buf, "<graphics_refresh_period>", ai.graphics.refresh_period)) continue;
|
else if (parse_double(buf, "<graphics_refresh_period>", ai.graphics.refresh_period)) continue;
|
||||||
else if (parse_double(buf, "<checkpoint_period>", ai.checkpoint_period)) continue;
|
else if (parse_double(buf, "<checkpoint_period>", ai.checkpoint_period)) continue;
|
||||||
else if (parse_double(buf, "<poll_period>", ai.poll_period)) continue;
|
else if (parse_double(buf, "<poll_period>", ai.poll_period)) continue;
|
||||||
|
else if (parse_double(buf, "<checkpoint_period>", ai.checkpoint_period)) continue;
|
||||||
else if (parse_double(buf, "<cpu_time>", ai.cpu_time)) continue;
|
else if (parse_double(buf, "<cpu_time>", ai.cpu_time)) continue;
|
||||||
else fprintf(stderr, "parse_core_file: unrecognized %s", buf);
|
else fprintf(stderr, "parse_core_file: unrecognized %s", buf);
|
||||||
}
|
}
|
||||||
|
|
|
@ -25,10 +25,11 @@ int main() {
|
||||||
MFILE mf;
|
MFILE mf;
|
||||||
unsigned long int i = 0;
|
unsigned long int i = 0;
|
||||||
int temp=0;
|
int temp=0;
|
||||||
|
APP_IN ai;
|
||||||
|
boinc_init(ai);
|
||||||
mf.open("foobar", "w");
|
mf.open("foobar", "w");
|
||||||
mf.printf("blah %d %f\n", 17, 34.5);
|
mf.printf("blah %d %f\n", 17, 34.5);
|
||||||
mf.printf("foo\n");
|
mf.printf("foo\n");
|
||||||
set_timer(1);
|
|
||||||
for(; i<100000000; i++) {
|
for(; i<100000000; i++) {
|
||||||
if(time_to_checkpoint()) {
|
if(time_to_checkpoint()) {
|
||||||
mf.printf("checkpoint: %ld\n", i);
|
mf.printf("checkpoint: %ld\n", i);
|
||||||
|
|
Loading…
Reference in New Issue