OpenVMS Source Code Demos
BASIC-HIBER-DEMO-100.BAS
1000 %TITLE "basic-hiber-demo.bas"
%IDENT "Version_100"
!====================================================================================
! Title : basic-hiber-demo_xxx.bas
! Author : Neil S. Rieck (Waterloo, Ontario, Canada)
! : (https://neilrieck.net/) (mailto:[email protected])
!====================================================================================
!
! Ver Who When What
! ---- --- ------ -------------------------------------------------------------------
! 1.00 NSR 010817 1. Original program
!====================================================================================
OPTION type = explicit ! cuz tricks are for kids
!
%include "starlet" %from %library "sys$library:basic$starlet" ! system services
!
declare basic$QuadWord DeltaQuad ,&
long rc%
!
! /// wakeup in 500 mS ///
!
! 1. calc delta time
! 2. clear the timer event flag (just incase)
! 3. arm the timer
!
rc% = sys$bintim("0 00:00:00.50", DeltaQuad ) ! init delta time
print "-e- $bintim rc="+str$(rc%) if (rc% and 1%) <> 1%
!
rc% = sys$schdwk(,,DeltaQuad by ref,) !
print "-e- $schdwk rc="+str$(rc%) if (rc% and 1%) <> 1%
!
print "going to sleep for 500mS"
rc% = sys$hiber ! go to sleep
print "-e- $hiber rc="+str$(rc%) if (rc% and 1%) <> 1%
!
call sys$canwak(,) ! cancel just incase
print "-e- $canwak rc="+str$(rc%) if (rc% and 1%) <> 1%
end
Back to
Home
Neil Rieck
Waterloo, Ontario, Canada.