delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2001/07/18/02:14:06

Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT sources DOT redhat DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT sources DOT redhat DOT com>
List-Help: <mailto:cygwin-help AT sources DOT redhat DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT sources DOT redhat DOT com
Delivered-To: mailing list cygwin AT sources DOT redhat DOT com
Message-ID: <001101c10f51$971e5680$8b0c4ea8@kepri.re.kr>
From: "Jong B. Lee" <jbdoll AT kepri DOT re DOT kr>
To: <cygwin AT cygwin DOT com>
Subject: [bug?] g77 intrinsic ETIME
Date: Wed, 18 Jul 2001 15:19:24 +0900
MIME-Version: 1.0
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 5.50.4133.2400
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400
X-MIME-Autoconverted: from base64 to 8bit by delorie.com id CAA28825

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

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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019