GetRtc Function

Description

Reads the current time from:

>a Sentinel HL Time key

>a Sentinel HL NetTime key

>a Sentinel HL (Driverless configuration) key that supports V-Clock

(The function works for a Sentinel SL key, but reads the time from the computer's clock.)

Syntax

hasp_status_t HASP_CALLCONV hasp_get_rtc(
                hasp_handle_t handle,
                hasp_time_t * time
                )

Parameters

handle

Handle for the session

time

Pointer to the current time

Return Values

HASP_STATUS_OK

HASP_INV_HND

HASP_BROKEN_SESSION

HASP_NO_BATTERY_POWER

HASP_NO_TIME

HASP_TIME_ERR

HASP_LOCAL_COMM_ERR

HASP_REMOTE_COMM_ERR

Usage Notes

Primarily used to obtain reliable timestamps that are independent of the system clock. Time values are returned as the number of seconds that have elapsed since Jan.-01-1970 0:00 hours UTC. Use the  HaspTimeToDateTime function to convert the output to UTC format. This function reads the Sentinel protection key time, not the expiration date time.