.TITLE Xshow_Check_Time - Check time differences ; If the current time is more the 5 minutes ahead of the time ; stored in the global section (representing the last time a scan ; was performed) then something has probably gone wrong with ; the scanning program. .LIBRARY "SYS$LIBRARY:lib" $SSDEF .PSECT Data, NOEXE, WRT, LONG Added_Time: .BLKQ 1 Current_Time: .BLKQ 1 Delta_Time: ; 0 00:05:00.0 .LONG ^X4D2FA200 .LONG ^X0FFFFFFFF .PSECT Code, EXE, NOWRT, LONG .ENTRY Xshow_Check_Time, ^M $GETTIM_S TIMADR = Current_Time BLBC R0, Exit MOVQ Delta_Time, R2 ; R2/R3 = 5 minutes delta time MOVQ @4(AP), R4 ; R4/R5 = Time of last scan SUBL2 R2, R4 ; Add 5 minutes to time of last scan SBWC R3, R5 ; (delta times are neg. so subtract) MOVQ R4, Added_Time PUSHAQ Added_Time PUSHAQ Current_Time ; Lib_Cmpq returns -1, 0, or 1 depending on which quadword is greater ; then the other (or 0 is they are equal). CALLS #2, G^Lib_Cmpq MOVL R0, @8(AP) ; Return the result of the comparison. MOVL #SS$_NORMAL, R0 Exit: RET .END