tfKernelGetPreciseFreq

Jump to: navigation, search

Table of Contents >> Programmer's Reference


#include <trsocket.h>


int tfKernelGetPreciseFreq (ttUser64BitPtr valPtr);


Function Description

This is a RTOS specific function that the user provides, if needed. It is called from some Treck protocols (e.g. SNTP) when there is a need for precise interval measurement. It is only called if the following configuration macro is defined in your trsystem.h:
#define TM_USE_KERNEL_PRECISE_TIME

A companion to function tfKernelGetPreciseTime(), this function tells Treck the rate at which the high frequency counter/timer increments in ticks per second.

If the tick value returned by tfKernelGetPreciseTime() has been arithmetically adjusted to wraparound at 2**64, that same arithmetic must be applied to the frequency value returned by this function.


Parameters


Returns

  • TM_KERN_OKAY
    Success.
  • TM_KERN_ERROR
    Failed to obtain the counter/timer frequency.


Table of Contents >> Programmer's Reference