Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/performance/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/joomla/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Windows 计算流程启动所需的时间。。!_Windows_Performance_Time_Process_Launchd - Fatal编程技术网

Windows 计算流程启动所需的时间。。!

Windows 计算流程启动所需的时间。。!,windows,performance,time,process,launchd,Windows,Performance,Time,Process,Launchd,如何计算进程在Windows中启动所需的时间 我可以使用GetProcessTimes()来处理此 BOOL WINAPI GetProcessTimes(HANDLE hProcess, LPFILETIME lpCreationTime, LPFILETIME lpExitTime, LPFILETIME lpKernelTime, LPFILETIME lpUserTime ); 我们可以从中获得流程创建时间。相反,我们不能获得特定进程启动所需的时间(例如:notepad.e

如何计算进程在Windows中启动所需的时间

我可以使用GetProcessTimes()来处理此

 BOOL WINAPI GetProcessTimes(HANDLE hProcess,
  LPFILETIME lpCreationTime, LPFILETIME lpExitTime,
 LPFILETIME lpKernelTime,
  LPFILETIME lpUserTime
);
我们可以从中获得流程创建时间。相反,我们不能获得特定进程启动所需的时间(例如:notepad.exe打开所需的时间)

它是通过内核时间还是创建时间减去用户时间来工作的?有什么建议吗


谢谢

您应该准确定义启动的含义。对于服务器程序或命令行工具来说,这可能没有那么容易!不是每个程序都会弹出一些顶级窗口!启动时间,我指的是进程加载其依赖项并向用户打开的持续时间。这对守护程序(或类似于
lighttpd的服务器)或命令行工具(例如
grep
)意味着什么?操作系统不跟踪应用程序何时“向用户打开”。这是您需要监控自己的事情(例如,通过监视窗口的创建)。我可以理解这些命令不会弹出任何窗口。但是对于弹出窗口的其他应用程序。?