NXGetSystemTick

Gets the interval between two consecutive clock interrupts.

Library:LibC
Classification:NKS
Service:NKS Platform

Syntax

  #include <nks/plat.h> 
   
  unsigned int NXGetSystemTick (void);
  

Return Values

Returns the system tick interval, expressed in nanoseconds.

Remarks

All time based (timeouts and delayed work) functions in NKS use the system tick as a way to express the time delta. On most platforms, typically timeouts are handled as part of handling the clock interrupt. Specifying time deltas as a multiple of system ticks is thus expected to result in an efficient implementation.

NXGetSystemTick is supplied to support clients that might want to specify absolute time intervals for any time-based function. If the NKS layer does not have access to absolute time information on a given host platform, NXGetSystemTick can return a reasonable tick value, and the tick based delta can be transformed internally to an absolute time delta.

See Also