gtpc2m8mC/C++ Language Support User's Guide

tpf_STCK-Store Clock

This function returns a pointer to the current value of the time-of-day (TOD) clock.

Format

include   <c$stck.h>
int        tpf_STCK(tpf_TOD_type *tod);

tod
A pointer of type tpf_TOD_type representing the address of the current value of the TOD clock.

Normal Return

STCK_OK is returned.

Error Return

STCK_ERROR is returned if the clock is in the error state, not-set state, or in the not-operational state.

Programming Considerations

None.

Examples

The following example gets the address of the current value of the TOD clock.

#include <c$stck.h>
 
tpf_TOD_type         tod_time;
 
if(tpf_STCK(&tod_time) != STCK_OK)
{
  /* tpf_STCK error */
}

Related Information

None.