forcedimension_core.dhd.os_independent module

forcedimension_core.dhd.os_independent.getTime() float[source]

Returns the current value from the high-resolution system counter in [s]. The resolution of the system counter may be machine-dependent, as it is usually derived from one of the CPU clock signals. The time returned, however, is guarunteed to be monotonic.

Returns:

The current monotonic time in [s] from the high-resolution system counter.

forcedimension_core.dhd.os_independent.kbGet() str[source]

Retrieve a character from the keyboard. This function is OS independent.

Returns:

The character hit on the keyboard.

forcedimension_core.dhd.os_independent.kbHit() bool[source]

Check keyboard for a key hit. This function is OS independent.

Returns:

True if a key on the keyboard was hit, and False otherwise.

forcedimension_core.dhd.os_independent.sleep(sec: float) None[source]

Sleep for a given period of time in [s]. This function is OS independent.