如何在 Windows 中查找服务或程序的 运行 时间

How to find the running time of a service or program in Windows

我正在尝试创建一个跟踪应用程序来跟踪我花在游戏或网络活动上的时间。其中一项任务是获取应用程序或进程在 Windows 系统中 运行 的时间。这可以存储在一些数据库中,稍后将被我的 Java 程序访问需要帮助以编程方式获取此信息。

您可以使用 powershell 找出这些:

New-TimeSpan -Start (get-process "outlook").StartTime