-- PDStartTimeImpl.mesa
-- Copyright (C) 1984, Xerox Corporation.  All rights reserved.
-- Michael Plass, 14-Sep-84 13:31:29
	-- 
DIRECTORY OthelloOps, PilotMP, Process, ProcessorFace, System;
	
PDStartTimeImpl: PROGRAM
	IMPORTS OthelloOps, Process, ProcessorFace, System
	= BEGIN
	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.