ASAP 1.1 Hybrid Manual
HP NonStop ASAP Hybrid Manual – 529729-004
Page 4-26
asap_getlastsampletime
Return the time that the domain was last sampled, in seconds since the system
was booted. Calling applications can use the standard Linux "sysinfo" system call
to get the current time since boot and compare it to the value returned by this
procedure.
Note that because this procedure does not update any values, there is no need
for a thread-safe variant. Both single-threaded and multi-threaded applications
can safely call this procedure at any time.
This procedure was added in version 1.1.6; the calling application must be using
this library version or later in order to call this procedure. In addition, asapxserver
version 1.1.6 or later must be running. Calling this procedure with an earlier
version of asapxserver will result in error -114, ASAP_ERROR_INVALID_SERVER,
being returned to the calling application.
Declaration
short asap_getlastsampletime (
void *handle, // IN REQUIRED
// Shared memory handle for this domain
long long *ptr_lastsample, // OUT REQUIRED
// Last sample time in seconds
short *ptr_error_detail = NULL // OUT OPTIONAL
// Detailed error number, if any
);
Parameter Descriptions
void *handle
The handle returned from the call to asap_register. This parameter is required.
long long *ptr_lastsample
Output parameter that will contain the last sample time on return. 0 indicates
that the domain has not yet been sampled. This parameter is required.
short *ptr_error_detail
A detailed error code, if any. This parameter is optional. The default value is
NULL, which means no detailed error code is returned.