+event *unschedule(int evtype)
+/* remove an event from the schedule */
+{
+ game.future[evtype].date = FOREVER;
+ return &game.future[evtype];
+}
+
+int is_scheduled(int evtype)
+/* is an event of specified type scheduled */
+{
+ return game.future[evtype].date != FOREVER;
+}
+
+double scheduled(int evtype)
+/* when will this event happen? */
+{
+ return game.future[evtype].date;
+}
+
+event *schedule(int evtype, double offset)
+/* schedule an event of specified type */
+{
+ game.future[evtype].date = game.state.date + offset;
+ return &game.future[evtype];
+}
+
+void postpone(int evtype, double offset)
+/* postpone a scheduled event */
+{
+ game.future[evtype].date += offset;
+}
+
+static bool cancelrest(void)
+/* rest period is interrupted by event */
+{
+ if (game.resting) {
+ skip(1);
+ proutn(_("Mr. Spock- \"Captain, shall we cancel the rest period?\""));
+ if (ja() == true) {
+ game.resting = false;
+ game.optime = 0.0;
+ return true;
+ }
+ }
+
+ return false;
+}
+