RepeatCommand.mesa
Copyright © 1986 by Xerox Corporation. All rights reserved.
Carl Hauser, May 8, 1986 9:43:19 am PDT
DIRECTORY
Rope USING [ROPE],
BasicTime USING [GMT, nullGMT];
RepeatCommand: CEDAR DEFINITIONS
~ BEGIN
Days: INT = 24*Hours;
Hours: INT = 60*Minutes;
Minutes: INT = 60*Seconds;
Seconds: INT = 1;
Forever: INT = LAST[INT];
Immediately: BasicTime.GMT = BasicTime.nullGMT;
Repeat: PUBLIC PROC [cmd: Rope.ROPE, period: INT ← Days, start: BasicTime.GMT ← Immediately, nTimes: INT ← Forever];
Repeatedly executes cmd, every period seconds, beginning at start and continuing until it has been done nTimes. cmd is executed in the command environment obtained from the $CommanderHandle property of the calling process.
END.