Changeset 107867 in vbox for trunk/src/VBox/Main
- Timestamp:
- Jan 21, 2025 6:29:59 AM (4 months ago)
- svn:sync-xref-src-repo-rev:
- 167074
- Location:
- trunk/src/VBox/Main
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/include/ObjectsTracker.h
r107254 r107867 155 155 } 156 156 157 com::Utf8StrupdateLastAccessTime();158 com::Utf8StrinitIdleTime();157 RTTIMESPEC updateLastAccessTime(); 158 RTTIMESPEC initIdleTime(); 159 159 com::Utf8Str creationTimeStr() const; 160 160 TrackedObjectState_T deletionTime(PRTTIMESPEC aTime) const; -
trunk/src/VBox/Main/src-all/ObjectsTracker.cpp
r107866 r107867 276 276 } 277 277 278 com::Utf8StrTrackedObjectData::updateLastAccessTime()278 RTTIMESPEC TrackedObjectData::updateLastAccessTime() 279 279 { 280 280 RTTimeNow(&m_lastAccessTime); 281 282 char szTime[RTTIME_STR_LEN]; 283 RTTimeSpecToString(&m_lastAccessTime, szTime, sizeof(szTime)); 284 return com::Utf8Str(szTime); 285 } 286 287 /** @todo r=bird: why on earth does this return a string? */ 288 com::Utf8Str TrackedObjectData::initIdleTime() 281 return m_lastAccessTime; 282 } 283 284 RTTIMESPEC TrackedObjectData::initIdleTime() 289 285 { 290 286 if (!m_fIdleTimeStart) … … 297 293 } 298 294 299 char szTime[RTTIME_STR_LEN]; 300 RTTimeSpecToString(&m_idleTimeStart, szTime, sizeof(szTime)); 301 return com::Utf8Str(szTime); 295 return m_idleTimeStart; 302 296 } 303 297 … … 562 556 { 563 557 /* Update some fields in the found object if needed. in instance, the last access time */ 564 com::Utf8Str lat = pIter->second.updateLastAccessTime(); /* Update the access time */ 565 Log2(("The updated last access time is %s\n", lat.c_str())); 558 RTTIMESPEC lat = pIter->second.updateLastAccessTime(); /* Update the access time */ 559 char szTime[RTTIME_STR_LEN]; 560 RTTimeSpecToString(&lat, szTime, sizeof(szTime)); 561 Log2(("The updated last access time is %s\n", szTime)); 566 562 } 567 563 hrc = S_OK; … … 609 605 { 610 606 /* Init idle time only once, next time returns the initialization time */ 611 com::Utf8Str strTime = pIter->second.initIdleTime(); 612 Log2(("The idle time start is %s\n", strTime.c_str())); 607 RTTIMESPEC idleTime = pIter->second.initIdleTime(); 608 char szTime[RTTIME_STR_LEN]; 609 RTTimeSpecToString(&idleTime, szTime, sizeof(szTime)); 610 Log2(("The idle time start is %s\n", szTime)); 613 611 vrc = VINF_SUCCESS; 614 612 }
Note:
See TracChangeset
for help on using the changeset viewer.