KS_getSystemTime
The function KS_getSystemTime reads the time the machine is running (obsolete).
ATTENTION! THIS FUNCTION IS OBSOLETE!
C/C++
Error KS_getSystemTime(UInt64* pSystemTime);
Delphi
function KS_getSystemTime(pSystemTime: PUInt64): Error;
C#
int KS_getSystemTime(long* pSystemTime);
Parameters
pSystemTime (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, where the system timer has a frequency of 1000 Hz.
This function is obsolete! You should use the function KS_getClock with the clock id KS_CLOCK_MILLISECONDS 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_getMachineTime, 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