home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!zaphod.mps.ohio-state.edu!rphroy!caen!hellgate.utah.edu!fcom.cc.utah.edu!osiris.usi.utah.edu!tim
- From: tim@osiris.usi.utah.edu (Tim Burns)
- Newsgroups: comp.unix.aix
- Subject: Fortran/C timing
- Message-ID: <1992Jul29.213246.13866@fcom.cc.utah.edu>
- Date: 29 Jul 92 21:32:46 GMT
- Sender: news@fcom.cc.utah.edu
- Reply-To: tim@osiris.usi.utah.edu (Tim Burns)
- Organization: School of Engineering and Applied Sciences, UCLA
- Lines: 54
- Originator: tim@osiris.usi.utah.edu
-
- To: pollack@ucunix.san.uc.edu
- Subject: Re: FOrtran utilities
- Newsgroups: comp.unix.aix
- In-Reply-To: <1992Jul29.192101.27729@ucunix.san.uc.edu>
- Organization: School of Engineering and Applied Sciences, UCLA
- Cc:
- Bcc:
-
- Hello,
-
- Here is a C program that you can call from fortran. You might want
- to use "MCLOCK*0.01 = seconds" though in your fortran program, because it
- is easier to use. On the 3090 you would use "CLOCKX = seconds".
-
- As far as date goes, the gettimeofday struct should have the date in
- it somewhere.
-
- Hope this helps
-
- Tim Burns
-
-
- -----------------cut me!-----------------------------------------
- #include <sys/time.h>
-
- /* Purpose: Fortran-callable interface to gettimeofday routine. */
-
- int mptime(int *sec, int *usec)
- {
- extern int gettimeofday();
-
- struct timeval t;
- struct timezone tz;
-
- int stat;
-
- stat = gettimeofday(&t, &tz);
-
- *sec = t.tv_sec;
- *usec = t.tv_usec;
-
- return(stat);
- }
- -----------------cut me!-----------------------------------------
- --
- *__T__* No matter how deeply I go down into myself
- _i_ my God is dark, and like a webbing made
- */m\* of a hundred roots that drink in silence.
- --Ranier Maria Rilke
- --
- *__T__* No matter how deeply I go down into myself
- _i_ my God is dark, and like a webbing made
- */m\* of a hundred roots that drink in silence.
- --Ranier Maria Rilke
-