mirror of https://github.com/BOINC/boinc.git
- VBOX: Do not count the sleep time as part of the elapsed time when the VM is supposed to be suspended.
This commit is contained in:
parent
42756406f5
commit
edfa1deae1
|
@ -6626,3 +6626,10 @@ David 2 Nov 2012
|
||||||
sched_send.cpp
|
sched_send.cpp
|
||||||
tools/
|
tools/
|
||||||
upgrade
|
upgrade
|
||||||
|
|
||||||
|
Rom 4 Nov 2012
|
||||||
|
- VBOX: Do not count the sleep time as part of the elapsed time when
|
||||||
|
the VM is supposed to be suspended.
|
||||||
|
|
||||||
|
samples\vboxwrapper\
|
||||||
|
vboxwrapper.cpp
|
||||||
|
|
|
@ -792,17 +792,20 @@ int main(int argc, char** argv) {
|
||||||
|
|
||||||
stopwatch_endtime = dtime();
|
stopwatch_endtime = dtime();
|
||||||
|
|
||||||
// Calculate the elapsed time after all potiential commands have been executed
|
|
||||||
// and base it off of wall clock time instead of a fixed interval.
|
|
||||||
if (!boinc_status.suspended) {
|
|
||||||
elapsed_time += stopwatch_endtime - stopwatch_time;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Sleep for the remainder of the polling period
|
// Sleep for the remainder of the polling period
|
||||||
sleep_time = POLL_PERIOD - (stopwatch_endtime - stopwatch_time);
|
sleep_time = POLL_PERIOD - (stopwatch_endtime - stopwatch_time);
|
||||||
if (sleep_time > 0) {
|
if (sleep_time > 0) {
|
||||||
boinc_sleep(sleep_time);
|
boinc_sleep(sleep_time);
|
||||||
elapsed_time += sleep_time;
|
}
|
||||||
|
|
||||||
|
// Calculate the elapsed time after all potiential commands have been executed
|
||||||
|
// and base it off of wall clock time instead of a fixed interval.
|
||||||
|
if (!boinc_status.suspended) {
|
||||||
|
if (sleep_time > 0) {
|
||||||
|
elapsed_time += sleep_time;
|
||||||
|
} else {
|
||||||
|
elapsed_time += stopwatch_endtime - stopwatch_time;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue