Ocean
|
This class implements basic functions related with the application process. More...
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. More... | |
float | averageProcessorLoad () const |
Returns the average processor load of this process since the creation. More... | |
Static Public Member Functions | |
static double | entireProcessorTime () |
Returns the entire processor time of this process since the creation. More... | |
static double | entireProcessLiveTime () |
Returns the live time of this process since the creation. More... | |
static long long | processStartTime () |
Returns the start time of this process since 01.01.1970 00:00:00 in UTC time. More... | |
static ProcessPriority | priority () |
Returns the priority of the process. More... | |
static bool | setPriority (const ProcessPriority priority) |
Sets the priority of the process. More... | |
static unsigned int | currentProcessId () |
Returns the process id of the current (calling) process. More... | |
Static Public Member Functions inherited from Ocean::Singleton< Process > | |
static Process & | get () |
Returns a reference to the unique object. More... | |
Private Member Functions | |
Process () | |
Creates a new process object. More... | |
Private Attributes | |
int64_t | loadTimestamp_ = 0ll |
Time of most recent processor load request. More... | |
int64_t | loadTime_ = 0ll |
Processor user time of most recent processor load request. More... | |
const unsigned int | numberCores_ = 0u |
Number of real CPU cores available in this system. More... | |
Friends | |
class | Singleton< Process > |
Additional Inherited Members | |
Protected Member Functions inherited from Ocean::Singleton< Process > | |
Singleton ()=default | |
Default constructor. More... | |
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.