timer: procedure(ctring); %include $stsdef; %include sys$clref; %include sys$setimr; %include sys$waitfr; dcl ctring char(2); dcl xtring char(10) var; xtring = '0 00:00:' || ctring; sts$value = sys$clref(5); if ^sts$success then return; sts$value = sys$setimr(5,getbintim(xtring),,); if ^sts$success then return; sts$value = sys$waitfr(5); if ^sts$success then return; return; getbintim: procedure(string) returns(bit(64) aligned); %include sys$bintim; %include $stsdef; dcl string char(*) VARYING, time bit(64) aligned; sts$value = sys$bintim(string,time); if sts$success then return(time); else return(0); end getbintim; end timer;