/[MITgcm]/MITgcm/eesupp/src/tim.c
ViewVC logotype

Annotation of /MITgcm/eesupp/src/tim.c

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.4 - (hide annotations) (download)
Tue May 18 17:38:32 1999 UTC (25 years, 1 month ago) by adcroft
Branch: MAIN
CVS Tags: checkpoint40pre3, checkpoint40pre1, checkpoint40pre7, checkpoint40pre6, checkpoint40pre9, checkpoint40pre8, checkpoint38, checkpoint40pre2, checkpoint40pre4, checkpoint28, checkpoint29, checkpoint22, checkpoint23, checkpoint24, checkpoint25, checkpoint27, branch-atmos-merge-freeze, branch-atmos-merge-start, pre38tag1, checkpoint26, c37_adj, branch-atmos-merge-shapiro, pre38-close, checkpoint39, checkpoint33, checkpoint32, checkpoint31, checkpoint30, checkpoint37, checkpoint36, checkpoint35, checkpoint34, checkpoint40pre5, branch-atmos-merge-zonalfilt, checkpoint40, branch-atmos-merge-phase5, branch-atmos-merge-phase4, branch-atmos-merge-phase7, branch-atmos-merge-phase6, branch-atmos-merge-phase1, branch-atmos-merge-phase3, branch-atmos-merge-phase2
Branch point for: branch-atmos-merge, pre38
Changes since 1.3: +6 -1 lines
File MIME type: text/plain
Tidied up F77 to C name conversions for Linux

1 adcroft 1.4 #ifdef TARGET_LINUX
2     #undef FORTRAN_MANGLE_TRAILING_UNDERSCORE
3     #else
4 cnh 1.3 #define FORTRAN_MANGLE_TRAILING_UNDERSCORE
5 adcroft 1.4 #endif
6 cnh 1.3 #define TIM_USES_GETTIMEOFDAY
7    
8     #ifdef FORTRAN_MANGLE_TRAILING_UNDERSCORE
9     #define procedure_cloc cloc_
10 adcroft 1.4 #else
11     #define procedure_cloc cloc
12 cnh 1.3 #endif
13     #ifdef TIM_USES_OSF_GETCLOCK
14 cnh 1.2 #include <stdio.h>
15     #include <stdlib.h>
16     #include <unistd.h>
17     #include <assert.h>
18     #include <sys/time.h>
19 cnh 1.3 void procedure_cloc ( double *curtim )
20 cnh 1.2 {
21     struct timespec tv1;
22     getclock(TIMEOFDAY, &tv1);
23     *curtim = (double)((tv1.tv_nsec)+(tv1.tv_sec)*1.E9);
24     *curtim = *curtim/1E9;
25     }
26 cnh 1.3 #endif
27     #ifdef TIM_USES_GETTIMEOFDAY
28     #include <stdio.h>
29     #include <stdlib.h>
30     #include <unistd.h>
31     #include <assert.h>
32     #include <sys/time.h>
33     void procedure_cloc ( double *curtim )
34     {
35     struct timeval tv1;
36     gettimeofday(&tv1 , (void *)NULL );
37     *curtim = (double)((tv1.tv_usec)+(tv1.tv_sec)*1.E6);
38     *curtim = *curtim/1.E6;
39    
40     }
41     #endif
42 cnh 1.2

  ViewVC Help
Powered by ViewVC 1.1.22