/[MITgcm]/MITgcm_contrib/cg2d_bench/tim.c
ViewVC logotype

Contents of /MITgcm_contrib/cg2d_bench/tim.c

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


Revision 1.1 - (show annotations) (download)
Tue Mar 27 14:11:50 2007 UTC (11 years, 8 months ago) by ce107
Branch: MAIN
CVS Tags: HEAD
File MIME type: text/plain
Forgotten timing code for non-MPI timing. :-(

1 #include <stdio.h>
2 #include <stdlib.h>
3 #include <unistd.h>
4 #include <assert.h>
5 #include <sys/time.h>
6
7 void cloc_( double *curtim )
8 {
9 struct timeval tv1;
10 gettimeofday(&tv1 , (void *)NULL );
11 *curtim = (double)((tv1.tv_usec)+(tv1.tv_sec)*1.E6);
12 *curtim = *curtim/1e6;
13
14 }
15
16 void cloc( double *curtim )
17 {
18 struct timeval tv1;
19 gettimeofday(&tv1 , (void *)NULL );
20 *curtim = (double)((tv1.tv_usec)+(tv1.tv_sec)*1.E6);
21 *curtim = *curtim/1e6;
22
23 }
24
25 void cloc__( double *curtim )
26 {
27 struct timeval tv1;
28 gettimeofday(&tv1 , (void *)NULL );
29 *curtim = (double)((tv1.tv_usec)+(tv1.tv_sec)*1.E6);
30 *curtim = *curtim/1e6;
31
32 }
33
34 void CLOC( double *curtim )
35 {
36 struct timeval tv1;
37 gettimeofday(&tv1 , (void *)NULL );
38 *curtim = (double)((tv1.tv_usec)+(tv1.tv_sec)*1.E6);
39 *curtim = *curtim/1e6;
40
41 }
42

  ViewVC Help
Powered by ViewVC 1.1.22