11%let flagfile=%sysfunc(pathname(work))/wait4file.flag;
19%mp_wait4file(&flagfile,maxwait=5)
23 desc=Checking that a file that exists passes straight through,
24 outds=work.test_results
28%let t0=%sysfunc(datetime());
29%mp_wait4file(%sysfunc(pathname(work))/never.flag,maxwait=2,interval=1)
30%let elapsed=%sysfunc(intck(second,&t0,%sysfunc(datetime())));
33%let t_none=%sysfunc(datetime());
34%mp_wait4file(,maxwait=5)
35%let waited_none=%sysfunc(intck(second,&t_none,%sysfunc(datetime())));
38 iftrue=(&waited_none<5),
39 desc=Checking that a call with no file returns instead of waiting,
40 outds=work.test_results
44 iftrue=(&elapsed>=1 and &elapsed<20),
45 desc=Checking that an absent file returns once maxwait expires,
46 outds=work.test_results