Changeset 47973 in vbox for trunk/src/VBox/Additions/common
- Timestamp:
- Aug 21, 2013 2:25:52 PM (12 years ago)
- svn:sync-xref-src-repo-rev:
- 88291
- Location:
- trunk/src/VBox/Additions/common/VBoxService
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/common/VBoxService/VBoxServiceVMInfo-win.cpp
r47962 r47973 835 835 NULL /* Exact read */); 836 836 if ( RT_SUCCESS(rc) 837 /* If uLastInput Msis set to UINT32_MAX VBoxTray was not able to retrieve the837 /* If uLastInput is set to UINT32_MAX VBoxTray was not able to retrieve the 838 838 * user's last input time. This might happen when running on Windows NT4 or older. */ 839 && ipcRes.uLastInput Ms!= UINT32_MAX)839 && ipcRes.uLastInput != UINT32_MAX) 840 840 { 841 VBoxGuestUserState userState = ipcRes.uLastInputMs < g_uVMInfoUserIdleThreshold841 VBoxGuestUserState userState = (ipcRes.uLastInput * 1000) < g_uVMInfoUserIdleThresholdMS 842 842 ? VBoxGuestUserState_InUse 843 843 : VBoxGuestUserState_Idle; … … 854 854 if (rc == VINF_SUCCESS) 855 855 { 856 VBoxServiceVerbose(4, "User \"%s\" (domain \"%s\") is idle for %RU32 ms\n",857 pszUser, pszDomain ? pszDomain : "<None>", ipcRes.uLastInput Ms);856 VBoxServiceVerbose(4, "User \"%s\" (domain \"%s\") is idle for %RU32s\n", 857 pszUser, pszDomain ? pszDomain : "<None>", ipcRes.uLastInput); 858 858 859 859 #if 0 /* Do we want to write the idle time as well? */ … … 873 873 } 874 874 #ifdef DEBUG 875 else if (ipcRes.uLastInput Ms== UINT32_MAX)875 else if (ipcRes.uLastInput == UINT32_MAX) 876 876 VBoxServiceVerbose(4, "Last input for user \"%s\" is not available, skipping\n", 877 877 pszUser, rc); -
trunk/src/VBox/Additions/common/VBoxService/VBoxServiceVMInfo.cpp
r47449 r47973 111 111 /** The current LA client info. */ 112 112 static VBOXSERVICELACLIENTINFO g_LAClientInfo; 113 /** User idle threshold . This specifies the minimum time a user is considered114 * being idle and then will be reported to the host. Default is 5s. */115 uint32_t g_uVMInfoUserIdleThreshold = 5 * 1000;113 /** User idle threshold (in ms). This specifies the minimum time a user is considered 114 * as being idle and then will be reported to the host. Default is 5s. */ 115 uint32_t g_uVMInfoUserIdleThresholdMS = 5 * 1000; 116 116 117 117 … … 172 172 else if (!strcmp(argv[*pi], "--vminfo-user-idle-threshold")) 173 173 rc = VBoxServiceArgUInt32(argc, argv, "", pi, 174 &g_uVMInfoUserIdleThreshold , 1, UINT32_MAX - 1);174 &g_uVMInfoUserIdleThresholdMS, 1, UINT32_MAX - 1); 175 175 return rc; 176 176 } … … 256 256 { 257 257 AssertPtr(pszValue); 258 g_uVMInfoUserIdleThreshold = RT_CLAMP(RTStrToUInt32(pszValue), 1000, UINT32_MAX - 1);258 g_uVMInfoUserIdleThresholdMS = RT_CLAMP(RTStrToUInt32(pszValue), 1000, UINT32_MAX - 1); 259 259 RTStrFree(pszValue); 260 260 } … … 1487 1487 " --vminfo-user-idle-threshold <ms>\n" 1488 1488 " Specifies the user idle threshold (in ms) for\n" 1489 " considering a guest user being asidle. The default\n"1489 " considering a guest user as being idle. The default\n" 1490 1490 " is 5000 (5 seconds).\n" 1491 1491 , -
trunk/src/VBox/Additions/common/VBoxService/VBoxServiceVMInfo.h
r47335 r47973 26 26 //RT_C_DECLS_END 27 27 28 extern uint32_t g_uVMInfoUserIdleThreshold ;28 extern uint32_t g_uVMInfoUserIdleThresholdMS; 29 29 30 30 #endif /* ___VBoxServiceVMInfo_h */
Note:
See TracChangeset
for help on using the changeset viewer.