1
2
3
4
5
6
7
8
9
10
11 pause: proc;
12
13
14
15 dcl cu_$arg_count ext entry (fixed bin),
16 cu_$arg_ptr ext entry (fixed bin, ptr, fixed bin, fixed bin),
17 com_err_ entry options (variable),
18 cv_dec_check_ entry (char (*), fixed bin) returns (fixed bin (35)),
19 timer_manager_$sleep ext entry (fixed bin (71), bit (2));
20
21 dcl arg_ptr ptr;
22
23 dcl arg char (arg_len) based (arg_ptr);
24
25 dcl (arg_len, code, count, time) fixed bin, pause_time fixed bin (71);
26
27 dcl error_table_$wrong_no_of_args fixed bin (35) external;
28
29
30
31 call cu_$arg_count (count);
32
33 if count = 0 then pause_time = 10;
34 else if count > 1 then do;
35 code = error_table_$wrong_no_of_args;
36 call com_err_ (code, "pause", "^/Usage: pause {seconds}");
37 return;
38 end;
39 else do;
40 call cu_$arg_ptr (1, arg_ptr, arg_len, code);
41 time = cv_dec_check_ (arg, code);
42 if code ^= 0 then do;
43 call com_err_ (0, "pause", " ""^a"" is not a decimal number of seconds.", arg);
44 return;
45 end;
46 pause_time = time;
47 end;
48
49 call timer_manager_$sleep (pause_time, "11"b);
50
51 return;
52
53 end;