LowLevel
Public / Methods
GetVariable
Returns the value of an environment variable.
The environment variable is retrieved from the user that is running the current process. If not found, the variable is retrieved from the current process.
PlatformForce
Forces platform detection to the given values.
This method must be called before the Tinman 3D library is initialized (see TinmanModule.Initialize), otherwise undefined behaviour may occur.
Public / Attributes
CpuTotal
Returns the estimated total CPU usage of the system.
The returned value is intended to be used for informational purposes only.
If the CPU usage cannot be determined (for any reason), this property will return 0
.
CpuUsed
Returns the estimated CPU usage of the calling process.
The returned value is intended to be used for informational purposes only.
If the CPU usage cannot be determined (for any reason), this property will return 0
.
Debug
Returns the debug flags of the process.
The debug flags are determined when TinmanModule.Initialize is called.
- See also
IsDebug
Checks if the process exhibits DEBUG
or DEBUGGER
behaviour (as indicated by object.ToString of TinmanError).
IsPosix
Is the calling process running under an OS that is compliant to POSIX?
The value of this flag may be used to decide at runtime which native system API to use, for example when doing CLR P/Invoke or when loading shared libraries.
The value of this flag is determined at runtime for C# and at compile-time for C++. So the same C# assembly may exhibit different behaviour between POSIX and Windows.
- See also
IsWindows
Running under a Windows OS?
The value of this flag may be used to decide at runtime which native system API to use, for example when doing CLR P/Invoke or when loading shared libraries.
The value of this flag is determined at runtime for C# and at compile-time for C++. So the same C# assembly may exhibit different behaviour between POSIX and Windows.
- See also
MemoryTotal
Returns the total amount of physical memory that is available to the process.
If the memory amount cannot be determined (for any reason), this property will return 0
. The SetSystemInfo method can be used to manually specify the amount of available physical memory.
MemoryUsed
Returns the estimated amount of physical memory that is currently being used by the process.
The returned value is intended to be used for informational purposes only. If the memory amount cannot be determined (for any reason), this property will return 0
.
PlatformName
Returns the human-readable name of the underlying platform.
The returned value is only intended for reporting, logging and debugging.
ProcessorCount
Returns the number of (logical) processors on the system.
This value does not necessarily represent physical CPU cores. Instead, it is meant to be a guide for determining how many threads to run in parallel at a given point in time.
- See also
SystemTimeString
Returns the UTC system time in the following format: yyyy-MM-dd HH:mm:ss
(for example 2014-01-31 15:56:30
).
TickCount
Returns the system tick count.
Upon initialization, the tick count starts at zero and will change sign every ~12 days. To avoid bugs due to wrap around, please note the following:
int timeout = 60000; // Never (!) do this: int time = LowLevel.TickCount + timeout; while (LowLevel.TickCount < time) { // Timeout detection will fail after wrap around! } // Instead, do this: int time = LowLevel.TickCount; while (LowLevel.TickCount - time < timeout) { // Integer arithmetic properly handles wrap around. }
System tick count values should not be used across thread boundaries.
- See also