ASAP 2.7 Extension Manual

Implementing the ASAP Extension in an Application
HP NonStop ASAP Extension Manual425265-004
4-25
Syntax for C Programmers
sample^secs
FIXED .EXT:ref:1
is the number of seconds since system cold load of the last ASAP sample time.
Syntax for C Programmers
#include ASAPXH(ASAP_GETLASTSAMPLETIME_)
/*#pragma ASAP_GETLASTSAMPLETIME_ */
_tal _extensible short ASAP_GETLASTSAMPLETIME_ (
long , /* IN REQUIRED */
/* Shared memory segment offset for this domain */
short _far *, /* OUT OPTIONAL */
/* Detailed error */
long long _far * /* OUT REQUIRED */
/* Seconds since system cold load */
);
Example GETLASTSAMPLETIME Procedure Call
int(32) seg^offset;
int error;
int error^detail;
string .domain^name[0:63];
fixed sample^seconds;
...
if (error := ASAP_REGISTER_(
...
if (error :=
ASAP_GETLASTSAMPLETIME_(seg^offset,error^detail,sample^seconds))
= 0 then begin
-- use valid sample^seconds value --
end;