diff --git a/BOINCClientAdapter.cpp b/BOINCClientAdapter.cpp index 6245478382ca7b8349c6b9db08119cc24c3894b4..3b6523eacf3b8ad978f9e33d34e88067e5e8dda8 100644 --- a/BOINCClientAdapter.cpp +++ b/BOINCClientAdapter.cpp @@ -149,3 +149,8 @@ double BOINCClientAdapter::wuDiskBound() const { return m_UserData.rsc_disk_bound; } + +double BOINCClientAdapter::wuCPUTimeSpent() const +{ + return m_UserData.wu_cpu_time; +} diff --git a/BOINCClientAdapter.h b/BOINCClientAdapter.h index 449c0727bf54eb85bcde0948786cc37800938031..d3659b02c34e589bb2b540a0dfbe0c59022c0e7f 100644 --- a/BOINCClientAdapter.h +++ b/BOINCClientAdapter.h @@ -122,6 +122,13 @@ public: double wuFPOpsBound() const; 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 diff --git a/StarsphereS5R3.cpp b/StarsphereS5R3.cpp index 762dba5c7ce1b44f8ab47d5a99a6ab876067fdc2..b84d9fc540a3deb1facc9d1ccc9067164882a8d4 100644 --- a/StarsphereS5R3.cpp +++ b/StarsphereS5R3.cpp @@ -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);