C   18/09/79            MEMBER NAME  MUTIME   (S)           FORTRAN
C   04/09/79 C9090701   MEMBER NAME  MUTIME   (S)           FORTRAN
      SUBROUTINE MUTIME(WORD)
C WRITTEN BY IAN DUERDOTH,  SEPT 6 1979.
C PRINTS OUT THE TIME LEFT FOR THE JOB AND THE TIME SINCE THE LAST CALL
C AND AN IDENTIFIER WORD ( 8CHARACTERS )
C  USE   CALL MUTIME('WORDWORD')
C  NTIME(DUM) GETS THE TIME LEFT IN 1/100 SECS
C  MODELL(MACH) GETS THE MACHINE THE JOB IS RUNNING ON
C  SCALE CONVERTS TO SECONDS AND IF ON MACHINE C (FASTER) SCALES BY 1.7
      REAL*8 WORD, ZZZZ/'ZZZZZZZZ'/
      LOGICAL FIRST /.TRUE./
      LOGICAL*1 LA/'A'/, LB/'B'/, LC/'C'/, LM
      EQUIVALENCE(MACH,LM)
      NTIM = NTIME(DUM)
      IF(FIRST) GOTO 10
   5  IF(WORD.EQ.ZZZZ) GOTO 20
      TIME =  SCALE*NTIM
      ELAPST =  SCALE*(LTIM-NTIM)
      WRITE(6,1) WORD, TIME, ELAPST
   1  FORMAT(' MUTIME AT **', A8, '**  TIME LEFT=',F6.2,'  TIME DIFF=',
     *  F6.2, 'SECS' )
      LTIM = NTIM
      RETURN
C
C  ON FIRST CALL GET THE MODEL, PRINT IT, AND SET THE SCALE.
  10  LTIM=NTIM
      FIRST = .FALSE.
      CALL MODELL(MACH)
      SCALE=0.0
      IF(LM.EQ.LA.OR.LM.EQ.LB) SCALE=0.01
      IF(LM.EQ.LC)SCALE=0.017
      WRITE(6,9)LM
    9 FORMAT(' MUTIME  -THIS JOB IS RUNNING ON MACHINE ',A1)
      IF(LM.EQ.LC) WRITE(6,91)
   91 FORMAT(' MUTIME  -PRINTED TIMES SCALED BY FACTOR 1.7 ')
      IF(SCALE.EQ.0.0)STOP
      GOTO 5
C
C  IF 'ZZZZ' THEN PASS THE SCALE TO TIMLFT
   20 WORD = SCALE
      RETURN
      END
C
C
      FUNCTION TIMLFT(DUM)
C  RETURNS THE TIME LEFT IN SECS,  EG:   A = TIMLFT(DUM)
C    DUM IS A DUMMY(UNUSED) ARGUEMENT
C  IF ON MACHINE C THE TIME IS SCALED BY 1.7
      LOGICAL SET /.FALSE./
      REAL*8 ZZZZ /'ZZZZZZZZ'/
      IF(SET) GOTO 1
C ON FIRST CALL WE HAVE TO GO AND GET THE SCALE FROM MUTIME
      CALL MUTIME(ZZZZ)
      SCALE = ZZZZ
      SET = .TRUE.
C
    1 TIMLFT =  SCALE*NTIME(DUMM)
      RETURN
      END
