c
c	hwclock.f 1.4 92/07/01 15:21:47
c
c  Copyright 1991 Intel Corporation, Inc.
c  See the "Copyright" file for complete rights and liability information.

      integer      iam, mtime
      integer      stime(2), etime(2), xtime(2)
      character*10 time

c  Identify self.

      iam = mynode()
      if(iam .eq. 0) print *, 'Starting...'

c  Get starting time.

      call hwclock(stime)

c  Activity whose elapsed execution time is desired
c    (in this case, a delay loop of approximately one second).

      mtime = mclock()
1     continue
      if(mclock() .lt. mtime+1000) goto 1

c  Get ending time.

      call hwclock(etime)

c  Calculate elapsed execution time.

      call esub(etime, stime, xtime)

c  Display elapsed execution time.

      call etos(xtime, time)
      write(*,100) iam, time
100   format('Node ', i3, ' elapsed execution time = ', a10,
     1       ' hardware clock ticks.')

      end
