Skip to content
Snippets Groups Projects
Commit 41df1f9c authored by Oliver Bock's avatar Oliver Bock
Browse files

HUD "CPU Time" display now shows the total time (previously accumulated + current session)

parent bf6bb041
Branches
Tags
No related merge requests found
......@@ -149,3 +149,8 @@ double BOINCClientAdapter::wuDiskBound() const
{
return m_UserData.rsc_disk_bound;
}
double BOINCClientAdapter::wuCPUTimeSpent() const
{
return m_UserData.wu_cpu_time;
}
......@@ -123,6 +123,13 @@ public:
double wuMemoryBound() const;
double wuDiskBound() const;
/**
* \brief Retrieves the accumulated time spent on the currently active work unit
*
* \return The time spent on the work unit
*/
double wuCPUTimeSpent() const;
/**
* \brief Retrieves information provided by the running science application
*
......
......@@ -72,8 +72,8 @@ void StarsphereS5R3::refreshBOINCInformation()
m_WUPercentDone = buffer.str();
buffer.str("");
/// \todo Show accumulated time (init_data time + shmem time)
const double cputime = m_EinsteinAdapter.wuCPUTime();
// show WU's total CPU time (previously accumulated + current session)
const double cputime = m_BoincAdapter.wuCPUTimeSpent() + m_EinsteinAdapter.wuCPUTime();
const int hrs = cputime / 3600;
const int min = (cputime - hrs*3600) / 60;
const int sec = cputime - (hrs*3600 + min*60);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment