Changeset 50841 in vbox for trunk/src/VBox/Frontends/VirtualBox
- Timestamp:
- Mar 21, 2014 12:13:29 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/VBoxVMInformationDlg.cpp
r48260 r50841 47 47 #include "CNetworkAdapter.h" 48 48 #include "CVRDEServerInfo.h" 49 50 #include <iprt/time.h> 49 51 50 52 #endif /* !VBOX_WITH_PRECOMPILED_HEADERS */ … … 476 478 .arg (xOrigin) 477 479 .arg (yOrigin); 480 /* this page is refreshed every 5 seconds, round */ 481 uint32_t uUpSecs = (RTTimeProgramSecTS() / 5) * 5; 482 char szUptime[32]; 483 uint32_t uUpDays = uUpSecs / (60 * 60 * 24); 484 uUpSecs -= uUpDays * 60 * 60 * 24; 485 uint32_t uUpHours = uUpSecs / (60 * 60); 486 uUpSecs -= uUpHours * 60 * 60; 487 uint32_t uUpMins = uUpSecs / 60; 488 uUpSecs -= uUpMins * 60; 489 RTStrPrintf(szUptime, sizeof(szUptime), "%dd %02d:%02d:%02d", 490 uUpDays, uUpHours, uUpMins, uUpSecs); 491 QString uptime = QString(szUptime); 478 492 479 493 QString clipboardMode = gpConverter->toString(m.GetClipboardMode()); … … 514 528 /* Searching for longest string */ 515 529 QStringList valuesList; 516 valuesList << resolution << virtualization << nested << unrestricted << addVersionStr << osType << vrdeInfo;530 valuesList << resolution << uptime << virtualization << nested << unrestricted << addVersionStr << osType << vrdeInfo; 517 531 int maxLength = 0; 518 532 foreach (const QString &value, valuesList) … … 522 536 result += hdrRow.arg (":/state_running_16px.png").arg (tr ("Runtime Attributes")); 523 537 result += formatValue (tr ("Screen Resolution"), resolution, maxLength); 538 result += formatValue (tr ("VM Uptime"), uptime, maxLength); 524 539 result += formatValue (tr ("Clipboard Mode"), clipboardMode, maxLength); 525 540 result += formatValue (tr ("Drag'n'Drop Mode"), dragAndDropMode, maxLength);
Note:
See TracChangeset
for help on using the changeset viewer.