INtime SDK Help
knGetKernelTime
INtime SDK v6 > About INtime > INtime Kernel > Time management > knGetKernelTime

Returns the value of the counter the kernel uses to tally the number of system timer ticks that have occurred. This call is non scheduling, and it may be used in interrupt handlers.

QWORD knGetKernelTime(
    LPKNTIME lpTime    // pointer to a KNTIME structure
);

Parameters

lpTime
If non-NULL, pointer to a KNTIME structure where the kernel stores the value. The value is also returned as a QWORD from the function.

Remarks

When the kernel is initialized, the count is set to 0 (zero). You can set the count to any value with knSetKernelTime.

Note: if used in an interrupt handler, use the return value from the function, or do not specify a value for lpTIme which is a pointer to a value on the stack (see Writing an interrupt handler).

Return Values

The 64-bit value of the system timer tick counter.

Requirements

Versions Defined in Include Link to
INtime 3.0 intime/rt/include/rtbase.h rt.h rt.lib
See Also

Interrupts