INtime SDK Help
SyncLocalRtClock

Immediately synchronizes the local time of day clock with an external source, such as the Windows time of day clock or the local Real-Time Clock hardware (on INtime Distributed RTOS nodes).

BOOLEAN SyncLocalRtClock(
    DWORD dwClockSource
);

Parameters

dwClockSource
One of the following values:
DEFAULT_CLOCK_TYPE Synchronize with the default source for the node type.
WINDOWS_CLOCK_TYPE Synchronize with the Windows clock source.
LOCAL_CLOCK_TYPE Synchronize with the RTC hardware clock source.

Remarks

The normal case should be to make the call with the value DEFAULT_CLOCK_SOURCE and allow the kernel to decide. WINDOWS_CLOCK_TYPE is the default for INtime for Windows nodes (sharing a host with Windows) and synchronizes the INtime time of day counter with the Windows GetSystemTime call.

LOCAL_CLOCK_TYPE is the default on a INtime Distributed RTOS node and synchronizes the INtime time of day clock with the local hardware (RTC) clock.

If LOCAL_CLOCK_TYPE is specified on an INtime for Windows node then the call will fail.

Return Values

TRUE
Success.
FALSE
Failure. To determine the status, call GetLastRtError.

Status

E_CONTEXT
Synchronization with the Windows clock failed because the service is not available.
E_EXIST
Synchronization with local RTC clock failed because location is a local INtime for Windows node.
E_PARAM
An invalid value was specified for the dwClockSource parameter.

Requirements

Versions Defined in Include Link to
INtime 4.0 intime/rt/include/rtbase.h rt.h rt.lib