|
Ocean
|
This class implements basic functions related with the application process. More...
#include <Process.h>
Public Types | |
| enum | ProcessPriority { PRIORITY_IDLE , PRIORITY_BELOW_NORMAL , PRIORITY_NORMAL , PRIORITY_ABOVE_NORMAL , PRIORITY_HIGH , PRIORITY_REALTIME } |
| Definition of different process priority values. More... | |
Public Member Functions | |
| float | currentProcessorLoad () const |
| Returns the processor load since the last call to this function. | |
| float | averageProcessorLoad () const |
| Returns the average processor load of this process since the creation. | |
Static Public Member Functions | |
| static double | entireProcessorTime () |
| Returns the entire processor time of this process since the creation. | |
| static double | entireProcessLiveTime () |
| Returns the live time of this process since the creation. | |
| static long long | processStartTime () |
| Returns the start time of this process since 01.01.1970 00:00:00 in UTC time. | |
| static ProcessPriority | priority () |
| Returns the priority of the process. | |
| static bool | setPriority (const ProcessPriority priority) |
| Sets the priority of the process. | |
| static unsigned int | currentProcessId () |
| Returns the process id of the current (calling) process. | |
Static Public Member Functions inherited from Ocean::Singleton< Process > | |
| static Process & | get () |
| Returns a reference to the unique object. | |
Private Member Functions | |
| Process () | |
| Creates a new process object. | |
Private Attributes | |
| int64_t | loadTimestamp_ = 0ll |
| Time of most recent processor load request. | |
| int64_t | loadTime_ = 0ll |
| Processor user time of most recent processor load request. | |
| const unsigned int | numberCores_ = 0u |
| Number of real CPU cores available in this system. | |
Friends | |
| class | Singleton< Process > |
Additional Inherited Members | |
Protected Member Functions inherited from Ocean::Singleton< Process > | |
| Singleton ()=default | |
| Default constructor. | |
This class implements basic functions related with the application process.
Definition of different process priority values.
|
private |
Creates a new process object.
As this class is a singleton get access to this object by the singleton.
| float Ocean::System::Process::averageProcessorLoad | ( | ) | const |
Returns the average processor load of this process since the creation.
|
static |
Returns the process id of the current (calling) process.
| float Ocean::System::Process::currentProcessorLoad | ( | ) | const |
Returns the processor load since the last call to this function.
|
static |
Returns the live time of this process since the creation.
|
static |
Returns the entire processor time of this process since the creation.
|
static |
Returns the priority of the process.
| NotSupportedException | Is thrown if this function is not supported |
|
static |
Returns the start time of this process since 01.01.1970 00:00:00 in UTC time.
|
static |
Sets the priority of the process.
| priority | Process priority to set |
|
mutableprivate |
Processor user time of most recent processor load request.
|
mutableprivate |
Time of most recent processor load request.
|
private |
Number of real CPU cores available in this system.