enh(Foundation): add Poco::Process::timesMicroseconds()

This commit is contained in:
Günter Obiltschnig
2024-11-21 08:50:49 +01:00
parent 21f93e3e6a
commit cecccf7b74
8 changed files with 58 additions and 5 deletions

View File

@@ -94,6 +94,10 @@ public:
/// Returns the number of seconds spent by the
/// current process in user and kernel mode.
static void timesMicroseconds(Poco::Int64& userTime, Poco::Int64& kernelTime);
/// Returns the number of microseconds spent by the
/// current process in user and kernel mode.
static ProcessHandle launch(const std::string& command, const Args& args, int options = 0);
/// Creates a new process for the given command and returns
/// a ProcessHandle of the new process. The given arguments are
@@ -268,6 +272,12 @@ inline void Process::times(long& userTime, long& kernelTime)
}
inline void Process::timesMicroseconds(Poco::Int64& userTime, Poco::Int64& kernelTime)
{
ProcessImpl::timesMicrosecondsImpl(userTime, kernelTime);
}
} // namespace Poco