mirror of https://github.com/BOINC/boinc.git
Merge pull request #4920 from Vulpine05/Vulpine05-4913
This commit is contained in:
commit
4120d2a3ef
|
@ -1312,10 +1312,12 @@ void CViewWork::GetDocReportDeadline(wxInt32 item, time_t& tBuffer) const {
|
|||
void CViewWork::GetDocEstCompletionDate(wxInt32 item, time_t& tBuffer) const {
|
||||
RESULT* result = wxGetApp().GetDocument()->result(item);
|
||||
tBuffer = 0;
|
||||
if (result->active_task_state == 1) {
|
||||
time_t ttime = time(0);
|
||||
tBuffer = ttime;
|
||||
tBuffer += (time_t)result->estimated_cpu_time_remaining;
|
||||
if (result) {
|
||||
if (result->active_task_state == 1) {
|
||||
time_t ttime = time(0);
|
||||
tBuffer = ttime;
|
||||
tBuffer += (time_t)result->estimated_cpu_time_remaining;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1323,13 +1325,14 @@ void CViewWork::GetDocEstCompletionDate(wxInt32 item, time_t& tBuffer) const {
|
|||
void CViewWork::GetDocEstDeadlineDiff(wxInt32 item, double& fBuffer) const {
|
||||
RESULT* result = wxGetApp().GetDocument()->result(item);
|
||||
fBuffer = 0;
|
||||
if (result->active_task_state == 1) {
|
||||
time_t tdeadline, testcompletion;
|
||||
GetDocEstCompletionDate(item, testcompletion);
|
||||
GetDocReportDeadline(item, tdeadline);
|
||||
fBuffer = (double)(tdeadline - testcompletion);
|
||||
if (result) {
|
||||
if (result->active_task_state == 1) {
|
||||
time_t tdeadline, testcompletion;
|
||||
GetDocEstCompletionDate(item, testcompletion);
|
||||
GetDocReportDeadline(item, tdeadline);
|
||||
fBuffer = (double)(tdeadline - testcompletion);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue