This is the mail archive of the cygwin@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

[bug?] g77 intrinsic ETIME


Dear list,

The following sample code, e_time.f, is to calculate program running time.

It uses g77 runtime library, etime.

On win9x (including winME), it returns 0.
On win2k, it returns correct running time.

Please guide me how to use etime on win9x.

Thanks.

=============================================
      program e_time
c
      implicit double precision (a-h,o-z)

      call secnd(time1)
      write(*,*) "time1 = ", time1
c
      isum=0
      do j=1, 10
      do i=1, 10000000
         isum = isum + i
      enddo
      enddo
c
      call secnd(time2)
      write(*,*) "time2 = ", time2
c
      write(*,10) (time2 - time1)
10    format(1x, "computer time =", f12.2, " seconds")
c
      stop
      end

      subroutine secnd(t)
c     return the time consumed so far in this run, in seconds.
      implicit double precision (a-h,o-z)
      real a2(2)
c
      t=0.
      t=etime(a2)
      return
      end

==================================

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]