|
MPIO v1.6.0
Multi-platform common IO library
|
Common operating system functions. More...
#include <stdint.h>#include <stdarg.h>#include <stdbool.h>Functions | |
| double | getCurrentClock () |
| Returns high resolution time stamp in seconds. (MT-Safe). | |
| int | getLogicalCpuCount () |
| Returns system logical CPU count. (MT-Safe). | |
| int | getPhysicalCpuCount () |
| Returns system physical CPU count. (MT-Safe). | |
| int | getPerformanceCpuCount () |
| Returns system performance CPU count. (MT-Safe). | |
| int64_t | getTotalRamSize () |
| Returns system total physical RAM size. (MT-Safe). | |
| int64_t | getFreeRamSize () |
| Returns system free physical RAM size. (MT-Safe). | |
| char * | getCpuName () |
| Returns system CPU name string. (MT-Safe). | |
| int | executeFileA (const char *filePath, char **args) |
| Executes specified file with arguments. (MT-Safe). | |
| int | executeFileVA (const char *filePath, va_list args) |
| Executes specified file with arguments. (MT-Safe). | |
| int | executeFile (const char *filePath,...) |
| Executes specified file with arguments. (MT-Safe). | |
| bool | openFileManager (const char *path) |
| Opens file using preferred application. (Explorer, Finder, Browser, etc.). | |
| void | showError (const char *title, const char *message) |
| Shows system error message. (Window or popup). | |
Common operating system functions.
| double getCurrentClock | ( | ) |
Returns high resolution time stamp in seconds. (MT-Safe).
That can be used for time-interval measurements.
| int getLogicalCpuCount | ( | ) |
Returns system logical CPU count. (MT-Safe).
Useful for a background thread pool thread count.
| int getPhysicalCpuCount | ( | ) |
Returns system physical CPU count. (MT-Safe).
Useful for a foreground thread pool thread count.
| int getPerformanceCpuCount | ( | ) |
Returns system performance CPU count. (MT-Safe).
Usefull for a foreground thread pool thread count.
| int64_t getTotalRamSize | ( | ) |
Returns system total physical RAM size. (MT-Safe).
Usefull for an OS information logging.
| int64_t getFreeRamSize | ( | ) |
Returns system free physical RAM size. (MT-Safe).
Usefull for an OS information logging.
| char * getCpuName | ( | ) |
Returns system CPU name string. (MT-Safe).
Usefull for an OS information logging.
| int executeFileA | ( | const char * | filePath, |
| char ** | args ) |
Executes specified file with arguments. (MT-Safe).
Safe std::system() function alternative with arguments.
| [in] | filePath | file path string |
| [in] | args | program arguments (last should be NULL!) |
| int executeFileVA | ( | const char * | filePath, |
| va_list | args ) |
Executes specified file with arguments. (MT-Safe).
Safe std::system() function alternative with arguments.
| [in] | filePath | file path string |
| args | program arguments |
| int executeFile | ( | const char * | filePath, |
| ... ) |
Executes specified file with arguments. (MT-Safe).
Safe std::system() function alternative with arguments.
| [in] | filePath | file path string |
| ... | program arguments |
| bool openFileManager | ( | const char * | path | ) |
Opens file using preferred application. (Explorer, Finder, Browser, etc.).
| [in] | path | directory or file path string |
| void showError | ( | const char * | title, |
| const char * | message ) |
Shows system error message. (Window or popup).
| [in] | title | message title string |
| [in] | message | error message string |