From: "A. Yakovlev" 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 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit 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 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.