c
c	dclock.f 1.4 92/07/01 15:18:56
c
c  Copyright 1991 Intel Corporation, Inc.
c  See the "Copyright" file for complete rights and liability information.
c
c  For each node, gets a starting and ending time of a process, and then
c  calculates the total execution time of that process.
c
c  The mclock() call works similarly to dclock().

      include 'fcube.h'

      integer          iam
      double precision stime, etime

c  Identify self.

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

c  Get starting time.

      stime = dclock()

c  Activity whose elapsed execution time is desired
c    (in this example, just a delay loop).

      do 10 i=1,10000
10    continue

c  Calculate elapsed execution time.

      etime = dclock() - stime

c  Display elapsed execution time.

      write(*,100) iam, etime
100   format('Node ', i3, ' elapsed execution time = ', f8.6,
     1       ' seconds.')

      end
