KS_getMachineTime
The function KS_getMachineTime reads the time the machine is running (obsolete).
ATTENTION! THIS FUNCTION IS OBSOLETE!
C/C++
Error KS_getMachineTime(UInt64* pMachineTime);
Delphi
function KS_getMachineTime(pMachineTime: PUInt64): Error;
C#
int KS_getMachineTime(long* pMachineTime);
Parameters
pMachineTime (UInt64*)
Pointer where to store the time.
Return values
KSERROR_BAD_PARAM | One parameter is wrong. |
KSERROR_FUNCTION_NOT_AVAILABLE | The chosen clock is not available. |
Comments
The function reads the time the machine is running since starting the PC. The machine time is expressed in a frequency of 10 MHz.
This function is obsolete! You should use the function KS_getClock with the clock id KS_CLOCK_MACHINE_TIME in new projects.
The function can be used on kernel-level, including real-time mode.
Example 1
KS_getMachineTime returns the current system time in 100-ns units. So, the frequency is 10 MHz.
UInt64 machineTime;
ksError = KS_getMachineTime(&machineTime);
if (ksError != KS_OK)
outputErr(ksError, "KS_getMachineTime", "Unable to get machine time.");
Example 2
See smp\ClockFunctionsLegacy.
See also
KS_calibrateMachineTime, KS_getSystemTicks, KS_getSystemTime, KS_getAbsTime, KS_getClock, KS_getClockSource, KS_setClockSource, KS_microDelay, KS_convertClock
Contained in: Clock Module
As part of Kithara »RealTime Suite«
Available since: version 2.00
Build date: 2013-04-17