tfKernelGetSystemTime

Jump to: navigation, search

Table of Contents >> Programmer's Reference


#include <trsocket.h>


int tfKernelGetSystemTime (
ttUser32BitPtr daysPtr,
ttUser32BitPtr secondsPtr
);


Function Description

This is a RTOS specific function that the user provides, if needed. It is called from some Treck protocols (e.g. HTTP and SMTP) when there is a need to send the current time and date to a peer.

The current time is derived from the sum of the two values, days + seconds elapsed since the Unix epoch. The seconds value should be sufficient, in which case days can be set to zero. However, you have the flexibility to specify any combination of days + seconds that sums to the current time.


Parameters

  • daysPtr
    A pointer to store the number of days elapsed since midnight (00:00:00), January 1, 1970, Coordinated Universal Time (UTC). You may specify 0 for *daysPtr if *secondsPtr accounts for the full elapsed time.
  • secondsPtr
    A pointer to store number of seconds elapsed since midnight (00:00:00), January 1, 1970, Coordinated Universal Time (UTC).


Returns

  • TM_KERN_OKAY
    Success.
  • TM_KERN_ERROR
    Failed to obtain the system time.


Table of Contents >> Programmer's Reference