delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/04/07/08:45:48

From: "A. Yakovlev" <jack AT catalysis DOT nsk DOT su>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: clock() for G77
Date: Mon, 07 Apr 1997 09:24:40 +0600
Organization: Intitute of Inorganic Chemistry
Message-ID: <334868F8.7D6B@catalysis.nsk.su>
References: <3344B306 DOT 41C6 AT fina DOT be>
NNTP-Posting-Host: copoka.che.nsk.su
Mime-Version: 1.0
Cache-Post-Path: copoka.che.nsk.su!unknown AT qc586zhi DOT catalysis DOT nsk DOT su
Lines: 32
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

Denis Mignon wrote:
> 
> Is there an equivalent in G77 for the clock() of GCC, or any other
> routine computing the time used by a program?
> How should it be used?  Thanks
> 
> Denis
> --
> ================================================
> Denis Mignon
> email : denis DOT mignon AT fina DOT be
> ================================================
Hi, Denis.
 I had this problem too. The only thing that can help, write
a C stub for those C-finctions which you'd like to use in FORTRAN code.
Something like this:

#include <time.h>

int clock_()
{
 return (int) clock();
}

Then you can call it from the FORTRAN routine as:

       INTEGER CLOCK
C      CLOCK returns number of clock ticks since the first call.
       I = CLOCK()

Regards,
 Alexey.

- Raw text -


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