mirror of
https://github.com/pocoproject/poco.git
synced 2025-10-23 00:07:59 +02:00
enh(Foundation): add Poco::Process::timesMicroseconds()
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
|
@@ -56,6 +56,7 @@ public:
|
||||
|
||||
static PIDImpl idImpl();
|
||||
static void timesImpl(long& userTime, long& kernelTime);
|
||||
static void timesMicrosecondsImpl(Poco::Int64& userTime, Poco::Int64& kernelTime);
|
||||
static ProcessHandleImpl* launchImpl(
|
||||
const std::string& command,
|
||||
const ArgsImpl& args,
|
||||
|
@@ -57,6 +57,7 @@ public:
|
||||
|
||||
static PIDImpl idImpl();
|
||||
static void timesImpl(long& userTime, long& kernelTime);
|
||||
static void timesMicrosecondsImpl(Poco::Int64& userTime, Poco::Int64& kernelTime);
|
||||
static ProcessHandleImpl* launchImpl(
|
||||
const std::string& command,
|
||||
const ArgsImpl& args,
|
||||
|
@@ -61,6 +61,7 @@ public:
|
||||
|
||||
static PIDImpl idImpl();
|
||||
static void timesImpl(long& userTime, long& kernelTime);
|
||||
static void timesMicrosecondsImpl(Poco::Int64& userTime, Poco::Int64& kernelTime);
|
||||
static ProcessHandleImpl* launchImpl(
|
||||
const std::string& command,
|
||||
const ArgsImpl& args,
|
||||
|
Reference in New Issue
Block a user