-- PDStartTimeImpl.mesa
-- Copyright (C) 1984, Xerox Corporation.  All rights reserved.
-- Michael Plass, 14-Sep-84 13:31:29
-- Tim Diebert,    8-Sep-86 13:51:02
-- 
DIRECTORY OthelloOps, PilotMP, Process, ProcessorFace, System, SystemExtras;
   
PDStartTimeImpl: PROGRAM
   IMPORTS OthelloOps, Process, ProcessorFace, System, SystemExtras
   = BEGIN ENABLE SystemExtras.ClockFailed => 
     { Process.Pause[Process.MsecToTicks[10000]]; RETRY; };
   teMP: CARDINAL = ProcessorFace.mp;
        ProcessorFace.SetMP[PilotMP.cTimeNotAvailable];
   UNTIL OthelloOps.IsTimeValid[] DO ENABLE
     OthelloOps.TimeServerError  =>
        { Process.Pause[Process.MsecToTicks[10000]]; RETRY; };
          time: System.GreenwichMeanTime;
          LTPs: System.LocalTimeParameters;
          [time, LTPs] ← OthelloOps.GetTimeFromTimeServer[];
          System.SetLocalTimeParameters[LTPs];
          OthelloOps.SetProcessorTime[time]; 
          ENDLOOP;
   ProcessorFace.SetMP[teMP];
   END.