# adiSetBoardClock

Sets the time on an AG or a CG board.

#### Supported board types

- AG

- CG

#### Prototype

DWORD adiSetBoardClock ( CTAHD ctahd, unsigned board, unsigned long time)

Argument | Description
ctahd | Context handle returned by ctaCreateContext or ctaAttachContext.
board | Board number as specified in the board keyword file.
time | Number of seconds elapsed since 1/1/70.

#### Return values

Return value | Description
SUCCESS |
CTAERR_DRIVER_SEND_FAILED | Invalid board.
CTAERR_INVALID_CTAHD | Context handle is invalid.
CTAERR_SVR_COMM | Server communication error.

#### Details

Use adiSetBoardClock to update the time on an AG board or a CG board, affecting the timestamp in all events that originate on the board. board does not have to be the same board that the ADI service is opened on, but it must be the same family of board (AG or CG). If you are opening the ADI service only to set the clock, set services[0].mvipaddr.mode to 0 (zero) in the call to ctaOpenServices so that no timeslot
is used.

#### See also

adiGetTimeStamp

#### Example

int mySetBoardClock (CTAHD ctahd, unsigned board)
{
time_t ltime = time(NULL);
return adiSetBoardClock( ctahd, board, ltime);
}