Cat
Typedefs | Enumerations | Functions
System Namespace Reference

Typedefs

typedef void * ImageHandle
 Definition of an image handle. More...
 
typedef void * ProcessHandle
 Definition of the process handle. More...
 
typedef void * ThreadHandle
 A Thread handle. More...
 

Enumerations

enum  ModuleType { UNKNOWN, SHAREDLIB, EXECUTABLE }
 
enum  InfoType {
  NoFetch, RemainTime, Times, ProcessBasics,
  PriorityBoost, Memory, Quota, System,
  Modules, IO
}
 Enumeration for fetching information. More...
 
enum  TimeType {
  Year, Month, Day, Hour,
  Min, Sec, milliSec, microSec,
  nanoSec
}
 Time type for conversion. More...
 

Functions

const std::string & moduleName ()
 Get the name of the (executable/DLL) file without file-type. More...
 
const std::string & moduleNameFull ()
 Get the full name of the (executable/DLL) file. More...
 
const ModuleType moduleType ()
 Get type of the module. More...
 
ProcessHandle processHandle ()
 Handle to running process. More...
 
ImageHandle moduleHandle ()
 Handle to currently executed module. More...
 
ImageHandle exeHandle ()
 Handle to the executable file running. More...
 
const std::string & exeName ()
 Name of the executable file running. More...
 
const std::vector< std::string > linkedModules ()
 Vector of names of linked modules. More...
 
void setModuleHandle (ImageHandle handle)
 Attach module handle. More...
 
const std::string & hostName ()
 Host name. More...
 
const std::string & osName ()
 OS name. More...
 
const std::string & osVersion ()
 OS version. More...
 
const std::string & machineType ()
 Machine type. More...
 
const std::string & accountName ()
 User login name. More...
 
long numCmdLineArgs ()
 Number of arguments passed to the commandline. More...
 
long argc ()
 Number of arguments passed to the commandline (==numCmdLineArgs()); just to match argv call... More...
 
const std::vector< std::string > cmdLineArgs ()
 Command line arguments including executable name as arg[0] as vector of strings. More...
 
char ** argv ()
 char** command line arguments including executable name as arg[0]; You may not modify them! More...
 
const std::string getEnv (const char *var)
 get a particular environment variable More...
 
const std::vector< std::string > getEnv ()
 get all environment variables More...
 
int setEnv (const std::string &name, const std::string &value, int overwrite=1)
 set an environment variables. More...
 
ThreadHandle threadSelf ()
 thread handle "accessor" More...
 
longlong adjustTime (TimeType typ, longlong timevalue)
 Convert time from OS native time to requested representation (Experts only) More...
 
longlong ellapsedTime (TimeType typ=milliSec, InfoType fetch=Times, long pid=-1)
 
longlong kernelTime (TimeType typ=milliSec, InfoType fetch=Times, long pid=-1)
 
longlong userTime (TimeType typ=milliSec, InfoType fetch=Times, long pid=-1)
 
longlong cpuTime (TimeType typ=milliSec, InfoType fetch=Times, long pid=-1)
 
longlong remainingTime (TimeType typ=milliSec, InfoType fetch=Quota, long pid=-1)
 
longlong creationTime (TimeType typ=milliSec, InfoType fetch=Times, long pid=-1)
 
longlong systemStart (TimeType typ=Sec)
 
longlong upTime (TimeType typ=Hour)
 
longlong currentTime (TimeType typ=milliSec)
 
longlong tickCount ()
 

Detailed Description

ModuleInfo: OS specific details to access at run-time the module configuration of the process.

M.Frank

Note: OS specific details as well as Gaudi details may not occur in this definition file, because this header is the used by both, the OS specific implementations and the gaudi specific implementation. Since e.g. IID is defined in both, this would lead automatically to complete comilation failures.....

Author
M.Frank

Note: OS specific details for process timing

Entrypoints:

On Windows NT Time is expressed as the amount of time that has elapsed since midnight on January 1, 1601 at Greenwich, England.

On Unix time is expressed as the amount of time that has elapsed since midnight on January 1, 1970 at Greenwich, England.

History :

+---------+----------------------------------------------+--------+
|    Date |                 Comment                      | Who    |
+---------+----------------------------------------------+--------+
| 11/11/00| Initial version.                             | MF     |
+---------+----------------------------------------------+--------+
Author
: M.Frank
Version
: 1.0

Typedef Documentation

◆ ImageHandle

typedef void* System::ImageHandle

Definition of an image handle.

Definition at line 30 of file ModuleInfo.h.

◆ ProcessHandle

typedef void* System::ProcessHandle

Definition of the process handle.

Definition at line 32 of file ModuleInfo.h.

◆ ThreadHandle

typedef void* System::ThreadHandle

A Thread handle.

Definition at line 63 of file System.h.

Enumeration Type Documentation

◆ InfoType

Enumeration for fetching information.

Enumerator
NoFetch 
RemainTime 
Times 
ProcessBasics 
PriorityBoost 
Memory 
Quota 
System 
Modules 
IO 

Definition at line 18 of file SystemBase.h.

◆ ModuleType

Enumerator
UNKNOWN 
SHAREDLIB 
EXECUTABLE 

Definition at line 28 of file ModuleInfo.h.

◆ TimeType

Time type for conversion.

Enumerator
Year 
Month 
Day 
Hour 
Min 
Sec 
milliSec 
microSec 
nanoSec 

Definition at line 53 of file Timing.h.

Function Documentation

◆ accountName()

const std::string & System::accountName ( )

User login name.

Definition at line 88 of file System.cpp.

Referenced by Application::Application(), and Server_NI6008::Server_NI6008().

88  {
89  static std::string account = "";
90  if ( account == "" ) {
91  const char* acct = ::getlogin();
92  if ( 0 == acct ) acct = ::getenv("LOGNAME");
93  if ( 0 == acct ) acct = ::getenv("USER");
94  account = (acct) ? acct : "Unknown";
95  }
96  return account;
97 }

◆ adjustTime()

longlong System::adjustTime ( TimeType  typ,
longlong  timevalue 
)

Convert time from OS native time to requested representation (Experts only)

◆ argc()

long System::argc ( )

Number of arguments passed to the commandline (==numCmdLineArgs()); just to match argv call...

Number of arguments passed to the commandline.

Definition at line 105 of file System.cpp.

References cmdLineArgs().

105  {
106  return cmdLineArgs().size();
107 }
const std::vector< std::string > cmdLineArgs()
Command line arguments including executable name as arg[0] as vector of strings.
Definition: System.cpp:110

◆ argv()

char ** System::argv ( )

char** command line arguments including executable name as arg[0]; You may not modify them!

Const char** command line arguments including executable name as arg[0].

added by I.B.

Definition at line 134 of file System.cpp.

References cmdLineArgs(), and s_argvChars.

134  {
136  if( s_argvChars.empty() ) { cmdLineArgs(); }
137  // We rely here on the fact that a vector's allocation table is contiguous
139  return (char**)&s_argvChars[0];
140 }
const std::vector< std::string > cmdLineArgs()
Command line arguments including executable name as arg[0] as vector of strings.
Definition: System.cpp:110
static std::vector< const char * > s_argvChars
Definition: System.cpp:36

◆ cmdLineArgs()

const std::vector< std::string > System::cmdLineArgs ( )

Command line arguments including executable name as arg[0] as vector of strings.

Const char** command line arguments including executable name as arg[0].

Definition at line 110 of file System.cpp.

References exeName(), s_argvChars, and s_argvStrings.

Referenced by argc(), argv(), and numCmdLineArgs().

110  {
111  if ( s_argvChars.size() == 0 ) {
112  char exe[1024];
113  sprintf(exe, "/proc/%d/cmdline", ::getpid());
114  FILE *cmdLine = ::fopen(exe,"r");
115  char cmd[1024];
116  if ( cmdLine ) {
117  long len = fread(cmd, sizeof(char), sizeof(cmd), cmdLine);
118  if ( len > 0 ) {
119  cmd[len] = 0;
120  for ( char* token = cmd; token-cmd < len; token += strlen(token)+1 ) {
121  s_argvStrings.push_back(token);
122  s_argvChars.push_back( s_argvStrings.back().c_str());
123  }
124  s_argvStrings[0] = exeName();
125  s_argvChars[0] = s_argvStrings[0].c_str();
126  }
127  }
128  ::fclose(cmdLine);
129  }
130  return s_argvStrings;
131 }
static std::vector< const char * > s_argvChars
Definition: System.cpp:36
const std::string & exeName()
Name of the executable file running.
Definition: ModuleInfo.cpp:187
static std::vector< std::string > s_argvStrings
Definition: System.cpp:35

◆ cpuTime()

longlong System::cpuTime ( TimeType  typ = milliSec,
InfoType  fetch = Times,
long  pid = -1 
)

Consumed CPU time of process in milli seconds.

Parameters
typIndicator or the unit the time will be returned.
fetchIndicator of the information to be fetched. If Fetch_None, the information will not be updated.
pidProcess ID of which the information will be returned
Returns
Requested value in the indicated units.

◆ creationTime()

longlong System::creationTime ( TimeType  typ = milliSec,
InfoType  fetch = Times,
long  pid = -1 
)

Process Creation time.

Parameters
typIndicator or the unit the time will be returned.
fetchIndicator of the information to be fetched. If Fetch_None, the information will not be updated.
pidProcess ID of which the information will be returned
Returns
Requested value in the indicated units.

◆ currentTime()

longlong System::currentTime ( TimeType  typ = milliSec)

Retrieve absolute system time

Parameters
typIndicator or the unit the time will be returned.
Returns
Requested value in the indicated units.

◆ ellapsedTime()

longlong System::ellapsedTime ( TimeType  typ = milliSec,
InfoType  fetch = Times,
long  pid = -1 
)

Ellapsed time since start of process in milli seconds.

Parameters
typIndicator or the unit the time will be returned.
timevalueTime value to be converted.
Returns
Requested value in the indicated units.

◆ exeHandle()

System::ImageHandle System::exeHandle ( )

Handle to the executable file running.

Definition at line 152 of file ModuleInfo.cpp.

References ModuleHandle, and processHandle().

Referenced by exeName().

152  {
153 #ifdef WIN32
154  if ( processHandle() ) {
155  static HINSTANCE handle = 0;
156  DWORD cbNeeded;
157  if ( 0 == handle && _psApi.isValid() ) {
158  if ( _psApi.EnumProcessModules( processHandle(), &handle, sizeof(ModuleHandle), &cbNeeded) ) {
159  }
160  }
161  return handle;
162  }
163 #elif defined(linux) || defined(__APPLE__)
164  // This does NOT work!
165  static Dl_info infoBuf, *info = &infoBuf;
166  if ( 0 == info ) {
167  void* handle = ::dlopen(0, RTLD_LAZY);
168  //printf("Exe handle:%X\n", handle);
169  if ( 0 != handle ) {
170  void* func = ::dlsym(handle, "main");
171  //printf("Exe:Func handle:%X\n", func);
172  if ( 0 != func ) {
173  if ( 0 != ::dladdr(func, &infoBuf) ) {
174  //std::cout << "All OK" << std::endl;
175  info = &infoBuf;
176  }
177  }
178  }
179  }
180  return info;
181 #elif __hpux
182  // Don't know how to solve this .....
183 #endif
184  return 0;
185 }
ProcessHandle processHandle()
Handle to running process.
Definition: ModuleInfo.cpp:114
static System::ImageHandle ModuleHandle
Definition: ModuleInfo.cpp:43
unsigned long DWORD
Definition: WinTypes.h:7

◆ exeName()

const std::string & System::exeName ( )

Name of the executable file running.

Definition at line 187 of file ModuleInfo.cpp.

References exeHandle(), and processHandle().

Referenced by cmdLineArgs().

187  {
188  static std::string module("");
189  if ( module.length() == 0 ) {
190  char name[512] = {"Unknown.module"};
191  name[0] = 0;
192 #ifdef WIN32
193  if ( _psApi.isValid() && processHandle() ) {
194  _psApi.GetModuleFileNameExA( processHandle(), (HINSTANCE)exeHandle(), name,sizeof(name) );
195  }
196 #elif defined(linux) || defined(__APPLE__)
197  char cmd[512];
198  ::sprintf(cmd, "/proc/%d/exe", ::getpid());
199  module = "Unknown";
200  ::readlink(cmd, name, sizeof(name));
201 #elif __hpux
202  ::realpath(((HMODULE*)exeHandle())->dsc.filename, name);
203 #endif
204  module = name;
205  }
206  return module;
207 }
ImageHandle exeHandle()
Handle to the executable file running.
Definition: ModuleInfo.cpp:152
ProcessHandle processHandle()
Handle to running process.
Definition: ModuleInfo.cpp:114

◆ getEnv() [1/2]

const std::string System::getEnv ( const char *  var)

get a particular environment variable

get a particular env var, return "UNKNOWN" if not defined

Definition at line 143 of file System.cpp.

Referenced by Application::bookkeeping(), and Application::loadHistoryFile().

143  {
144  char* env;
145  if ( (env = getenv(var)) != 0 ) {
146  return env;
147  } else {
148  return "UNKNOWN";
149  }
150 }
Definition: var.h:19

◆ getEnv() [2/2]

const std::vector< std::string > System::getEnv ( )

get all environment variables

get all defined environment vars

Definition at line 153 of file System.cpp.

References environ.

153  {
154  std::vector<std::string> vars;
155  for (int i=0; environ[i] != 0; ++i) {
156  vars.push_back(environ[i]);
157  }
158  return vars;
159 }
char ** environ
std::vector< var > vars
Definition: var.h:73

◆ hostName()

const std::string & System::hostName ( )

Host name.

Definition at line 39 of file System.cpp.

Referenced by Application::Application(), Computer::Computer(), and Server_NI6008::Server_NI6008().

39  {
40  static std::string host = "";
41  if ( host == "" ) {
42  char buffer[512];
43  memset(buffer,0,sizeof(buffer));
44  ::gethostname(buffer, sizeof(buffer));
45  host = buffer;
46  }
47  return host;
48 }

◆ kernelTime()

longlong System::kernelTime ( TimeType  typ = milliSec,
InfoType  fetch = Times,
long  pid = -1 
)

CPU kernel mode time of process in milli seconds.

Parameters
typIndicator or the unit the time will be returned.
fetchIndicator of the information to be fetched. If Fetch_None, the information will not be updated.
pidProcess ID of which the information will be returned
Returns
Requested value in the indicated units.

◆ linkedModules()

const std::vector< std::string > System::linkedModules ( )

Vector of names of linked modules.

Definition at line 209 of file ModuleInfo.cpp.

References processHandle(), and s_linkedModules.

209  {
210  if ( s_linkedModules.size() == 0 ) {
211 #ifdef WIN32
212  char name[255]; // Maximum file name length on NT 4.0
213  DWORD cbNeeded;
214  HINSTANCE handle[1024];
215  if ( _psApi.isValid() ) {
216  if ( _psApi.EnumProcessModules(processHandle(),handle,sizeof(handle),&cbNeeded) ) {
217  for (size_t i = 0; i < cbNeeded/sizeof(HANDLE); i++ ) {
218  if ( 0 < _psApi.GetModuleFileNameExA( processHandle(), handle[i], name, sizeof(name)) ) {
219  s_linkedModules.push_back(name);
220  }
221  }
222  }
223  }
224 #elif defined(linux) || defined(__APPLE__)
225  char ff[512], cmd[1024], fname[1024], buf1[64], buf2[64], buf3[64], buf4[64];
226  ::sprintf(ff, "/proc/%d/maps", ::getpid());
227  FILE* maps = ::fopen(ff, "r");
228  while( ::fgets(cmd, sizeof(cmd), maps) ) {
229  int len;
230  sscanf(cmd, "%s %s %s %s %d %s", buf1, buf2, buf3, buf4, &len, fname);
231  if ( len > 0 && strncmp(buf2,"r-xp",strlen("r-xp")) == 0 ) {
232  s_linkedModules.push_back(fname);
233  }
234  }
235  ::fclose(maps);
236 #endif
237  }
238  return s_linkedModules;
239 }
ProcessHandle processHandle()
Handle to running process.
Definition: ModuleInfo.cpp:114
void * HANDLE
Definition: WinTypes.h:23
unsigned long DWORD
Definition: WinTypes.h:7
static std::vector< std::string > s_linkedModules
Definition: ModuleInfo.cpp:44

◆ machineType()

const std::string & System::machineType ( )

Machine type.

Definition at line 76 of file System.cpp.

76  {
77  static std::string mach = "";
78  struct utsname ut;
79  if (uname(&ut) == 0) {
80  mach = ut.machine;
81  } else {
82  mach = "UNKNOWN";
83  }
84  return mach;
85 }

◆ moduleHandle()

System::ImageHandle System::moduleHandle ( )

Handle to currently executed module.

Definition at line 128 of file ModuleInfo.cpp.

References ModuleHandle, and processHandle().

Referenced by moduleName(), and moduleNameFull().

128  {
129  if ( 0 == ModuleHandle ) {
130  if ( processHandle() ) {
131 #ifdef WIN32
132  static HINSTANCE handle = 0;
133  DWORD cbNeeded;
134  if ( 0 == handle && _psApi.isValid() ) {
135  if ( _psApi.EnumProcessModules( processHandle(), &handle, sizeof(ModuleHandle), &cbNeeded) ) {
136  }
137  }
138  return handle;
139 #elif defined(linux) || defined(__APPLE__)
140  static Dl_info info;
141  if ( 0 != ::dladdr((void*)System::moduleHandle, &info) ) {
142  return &info;
143  }
144 #elif __hpux
145  return 0; // Don't know how to solve this .....
146 #endif
147  }
148  }
149  return ModuleHandle;
150 }
ImageHandle moduleHandle()
Handle to currently executed module.
Definition: ModuleInfo.cpp:128
ProcessHandle processHandle()
Handle to running process.
Definition: ModuleInfo.cpp:114
static System::ImageHandle ModuleHandle
Definition: ModuleInfo.cpp:43
unsigned long DWORD
Definition: WinTypes.h:7

◆ moduleName()

const std::string & System::moduleName ( )

Get the name of the (executable/DLL) file without file-type.

Retrieve base name of module.

Definition at line 47 of file ModuleInfo.cpp.

References moduleHandle(), and processHandle().

47  {
48  static std::string module("");
49  if ( module == "" ) {
50  if ( processHandle() && moduleHandle() ) {
51 #ifdef WIN32
52  char moduleName[256] = {"Unknown.module"};
53  moduleName[0] = 0;
54  if ( _psApi.isValid() ) {
55  _psApi.GetModuleBaseNameA( processHandle(), (HINSTANCE)moduleHandle(), moduleName, sizeof(moduleName) );
56  }
57  std::string mod = moduleName;
58 #elif defined(__linux__) || defined(linux)
59  std::string mod = ::basename((char*)((Dl_info*)moduleHandle())->dli_fname);
60 #elif __hpux
61  std::string mod = ::basename(((HMODULE*)moduleHandle())->dsc.filename);
62 #endif
63  module = mod.substr(0, mod.rfind('.'));
64  }
65  }
66  return module;
67 }
const std::string & moduleName()
Get the name of the (executable/DLL) file without file-type.
Definition: ModuleInfo.cpp:47
ImageHandle moduleHandle()
Handle to currently executed module.
Definition: ModuleInfo.cpp:128
ProcessHandle processHandle()
Handle to running process.
Definition: ModuleInfo.cpp:114

◆ moduleNameFull()

const std::string & System::moduleNameFull ( )

Get the full name of the (executable/DLL) file.

Retrieve full name of module.

Definition at line 70 of file ModuleInfo.cpp.

References moduleHandle(), and processHandle().

Referenced by moduleType().

70  {
71  static std::string module("");
72  if ( module == "" ) {
73  if ( processHandle() && moduleHandle() ) {
74  char name[512] = {"Unknown.module"};
75  name[0] = 0;
76 #ifdef WIN32
77  if ( _psApi.isValid() ) {
78  _psApi.GetModuleFileNameExA( processHandle(), (HINSTANCE)moduleHandle(), name,sizeof(name) );
79  }
80 #elif defined(linux) || defined(__APPLE__)
81  ::realpath(((Dl_info*)moduleHandle())->dli_fname, name);
82 #elif __hpux
83  ::realpath(((HMODULE*)moduleHandle())->dsc.filename, name);
84 #endif
85  module = name;
86  }
87  }
88  return module;
89 }
ImageHandle moduleHandle()
Handle to currently executed module.
Definition: ModuleInfo.cpp:128
ProcessHandle processHandle()
Handle to running process.
Definition: ModuleInfo.cpp:114

◆ moduleType()

const System::ModuleType System::moduleType ( )

Get type of the module.

Definition at line 92 of file ModuleInfo.cpp.

References EXECUTABLE, moduleNameFull(), SHAREDLIB, and UNKNOWN.

92  {
93  static ModuleType type = UNKNOWN;
94  if ( type == UNKNOWN ) {
95  const std::string& module = moduleNameFull();
96  int loc = module.rfind('.')+1;
97  if ( loc == 0 )
98  type = EXECUTABLE;
99  else if ( module[loc] == 'e' || module[loc] == 'E' )
100  type = EXECUTABLE;
101 #ifdef WIN32
102  else if ( module[loc] == 'd' || module[loc] == 'D' )
103 #else
104  else if ( module[loc] == 's' && module[loc+1] == 'o' )
105 #endif
106  type = SHAREDLIB;
107  else
108  type = UNKNOWN;
109  }
110  return type;
111 }
ModuleType
Definition: ModuleInfo.h:28
const std::string & moduleNameFull()
Get the full name of the (executable/DLL) file.
Definition: ModuleInfo.cpp:70

◆ numCmdLineArgs()

long System::numCmdLineArgs ( )

Number of arguments passed to the commandline.

Definition at line 100 of file System.cpp.

References cmdLineArgs().

100  {
101  return cmdLineArgs().size();
102 }
const std::vector< std::string > cmdLineArgs()
Command line arguments including executable name as arg[0] as vector of strings.
Definition: System.cpp:110

◆ osName()

const std::string & System::osName ( )

OS name.

Definition at line 51 of file System.cpp.

Referenced by Application::Application(), and Server_NI6008::Server_NI6008().

51  {
52  static std::string osname = "";
53  struct utsname ut;
54  if (uname(&ut) == 0) {
55  osname = ut.sysname;
56  } else {
57  osname = "UNKNOWN";
58  }
59  return osname;
60 }

◆ osVersion()

const std::string & System::osVersion ( )

OS version.

Definition at line 64 of file System.cpp.

Referenced by Application::Application(), and Server_NI6008::Server_NI6008().

64  {
65  static std::string osver = "";
66  struct utsname ut;
67  if (uname(&ut) == 0) {
68  osver = ut.release;
69  } else {
70  osver = "UNKNOWN";
71  }
72  return osver;
73 }

◆ processHandle()

void * System::processHandle ( )

Handle to running process.

Retrieve processhandle.

Definition at line 114 of file ModuleInfo.cpp.

References FALSE.

Referenced by exeHandle(), exeName(), linkedModules(), moduleHandle(), moduleName(), and moduleNameFull().

114  {
115  static long pid = ::getpid();
116 #ifdef WIN32
117  static HANDLE hP = ::OpenProcess(PROCESS_QUERY_INFORMATION|PROCESS_VM_READ,FALSE,pid);
118 #else
119  static void* hP = (void*)pid;
120 #endif
121  return hP;
122 }
#define FALSE
Definition: WinTypes.h:56
void * HANDLE
Definition: WinTypes.h:23

◆ remainingTime()

longlong System::remainingTime ( TimeType  typ = milliSec,
InfoType  fetch = Quota,
long  pid = -1 
)

Maximum processing time left for this process.

Parameters
typIndicator or the unit the time will be returned.
fetchIndicator of the information to be fetched. If Fetch_None, the information will not be updated.
pidProcess ID of which the information will be returned
Returns
Requested value in the indicated units.

◆ setEnv()

int System::setEnv ( const std::string &  name,
const std::string &  value,
int  overwrite = 1 
)

set an environment variables.

Set an environment variables. If value is empty, the variable is removed from the environment. When overwrite is 0, the variable is not set if already present. Returns 0 on success, -1 on failure. See man 3 setenv.

Returns
0 if successful, -1 if not

Definition at line 162 of file System.cpp.

163 {
164  // UNIX version
165  return value.empty() ?
166  // remove if set to nothing (and return success)
167  ::unsetenv(name.c_str()) , 0 :
168  // set the value
169  ::setenv(name.c_str(),value.c_str(), overwrite);
170 }

◆ setModuleHandle()

void System::setModuleHandle ( System::ImageHandle  handle)

Attach module handle.

Definition at line 124 of file ModuleInfo.cpp.

References ModuleHandle.

124  {
125  ModuleHandle = handle;
126 }
static System::ImageHandle ModuleHandle
Definition: ModuleInfo.cpp:43

◆ systemStart()

longlong System::systemStart ( TimeType  typ = Sec)

Maximum processing time left for this process.

Parameters
typIndicator or the unit the time will be returned.
Returns
Requested value in the indicated units.

◆ threadSelf()

ThreadHandle System::threadSelf ( )
inline

thread handle "accessor"

Definition at line 65 of file System.h.

65 { return (void*)0; }

◆ tickCount()

longlong System::tickCount ( )

Retrieve the number of ticks since system startup

Returns
Requested value in the indicated units.

◆ upTime()

longlong System::upTime ( TimeType  typ = Hour)

Maximum processing time left for this process.

Parameters
typIndicator or the unit the time will be returned.
Returns
Requested value in the indicated units.

◆ userTime()

longlong System::userTime ( TimeType  typ = milliSec,
InfoType  fetch = Times,
long  pid = -1 
)

CPU user mode time of process in milli seconds.

Parameters
typIndicator or the unit the time will be returned.
fetchIndicator of the information to be fetched. If Fetch_None, the information will not be updated.
pidProcess ID of which the information will be returned
Returns
Requested value in the indicated units.