C++ CJob::QueryBasicAccountingInfo方法代码示例(c++cjob::querybasicaccountinginfo方法的典型用法代码示例)

本文整理汇总了C++中CJob::QueryBasicAccountingInfo方法的典型用法代码示例。如果您正苦于以下问题:C++ CJob::QueryBasicAccountingInfo方法的具体用法?C++ CJob::QueryBasicAccountingInfo怎么用?C++ CJob::QueryBasicAccountingInfo使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在CJob的用法示例。


C++ CJob::QueryBasicAccountingInfo方法代码示例(c++cjob::querybasicaccountinginfo方法的典型用法代码示例)

在下文中一共展示了CJob::QueryBasicAccountingInfo方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: JobNotify

//.........这里部分代码省略.........
                     szProcessName, 
					 po);
             }
             break;

             default:
                 StringCchPrintf(
					 psz, 
					 _countof(sz) - _tcslen(sz),
                     TEXT("Unknown notification: %d"), 
					 dwBytesXferred);
             break;
         }
         ListBox_SetCurSel(hwndLB, ListBox_AddString(hwndLB, sz));
         /* Force a status update when a notification arrives */
         CompKey = 1; 
      }

      if (CompKey == COMPKEY_STATUS) 
	  {
         static int s_nStatusCount = 0;

         StringCchPrintf(
			 sz, 
			 _countof(sz), 
             TEXT("--> Status Update (%u)"), 
			 s_nStatusCount++);

         ListBox_SetCurSel(hwndLB, ListBox_AddString(hwndLB, sz));

         /* Show the basic accounting information */
         JOBOBJECT_BASIC_AND_IO_ACCOUNTING_INFORMATION jobai;

         g_job.QueryBasicAccountingInfo(&jobai);

         StringCchPrintf(
			 sz, 
			 _countof(sz), 
             TEXT("Total Time: User=%I64u, Kernel=%I64u        ")
             TEXT("Period Time: User=%I64u, Kernel=%I64u"), 
             jobai.BasicInfo.TotalUserTime.QuadPart, 
             jobai.BasicInfo.TotalKernelTime.QuadPart,
             jobai.BasicInfo.ThisPeriodTotalUserTime.QuadPart, 
             jobai.BasicInfo.ThisPeriodTotalKernelTime.QuadPart);

         ListBox_SetCurSel(hwndLB, ListBox_AddString(hwndLB, sz));

         StringCchPrintf(
			 sz, 
			 _countof(sz), 
             TEXT("Page Faults=%u, Total Processes=%u, ")
             TEXT("Active Processes=%u, Terminated Processes=%u"), 
             jobai.BasicInfo.TotalPageFaultCount, 
             jobai.BasicInfo.TotalProcesses, 
             jobai.BasicInfo.ActiveProcesses, 
             jobai.BasicInfo.TotalTerminatedProcesses);

         ListBox_SetCurSel(hwndLB, ListBox_AddString(hwndLB, sz));

         /* Show the I/O accounting information */
         StringCchPrintf(
			 sz, 
			 _countof(sz), 
             TEXT("Reads=%I64u (%I64u bytes), ")
             TEXT("Write=%I64u (%I64u bytes), Other=%I64u (%I64u bytes)"), 
             jobai.IoInfo.ReadOperationCount, 
开发者ID:melvinvarkey,项目名称:ANCI_C_Training,代码行数:67,代码来源:JobLab.cpp

本文标签属性:

示例:示例志愿表

代码:代码编程

CJob:cjob151

QueryBasicAccountingInfo:QueryBasicAccountingInfo

上一篇:七夕是什么节?(七夕是什么时候?)
下一篇:Java JavaVersion.getMajorVersion方法代码示例(javajavaversion.getmajorversion方法的典型用法代码示例)

为您推荐