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

Contents of /MITgcm/eesupp/src/timer_stats.c

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


Revision 1.1.2.1 - (show annotations) (download)
Fri Feb 15 22:23:39 2002 UTC (22 years, 3 months ago) by heimbach
Branch: ecco-branch
CVS Tags: ecco_c50_e32, ecco_c50_e33, ecco_c50_e30, ecco_c50_e31, ecco_c51_e34d, ecco_c51_e34e, ecco_c51_e34f, ecco_c51_e34g, ecco_c51_e34a, ecco_c51_e34b, ecco_c51_e34c, icebear5, icebear4, icebear3, icebear2, ecco_c50_e29, ecco_c50_e28, ecco_c44_e19, ecco_c50_e33a, ecco_c51_e34, ecco_ice2, ecco_ice1, ecco_c44_e22, ecco_c44_e25, ecco_c44_e23, ecco_c44_e20, ecco_c44_e21, ecco_c44_e26, ecco_c44_e27, ecco_c44_e24
Branch point for: c24_e25_ice, icebear
Changes since 1.1: +0 -0 lines
File MIME type: text/plain
Added to repository. Needed for IBM SP3.

1 #include <sys/types.h>
2 #include <sys/times.h>
3 #include <sys/time.h>
4
5 double user_time(void);
6 double system_time(void);
7 double timenow();
8
9 double user_time(void)
10 {
11 clock_t blabla;
12 struct tms timest;
13
14 blabla = times(&timest);
15 return timest.tms_utime;
16
17 }
18
19 double system_time(void)
20 {
21 clock_t blabla;
22 struct tms timest;
23
24 blabla = times(&timest);
25 return timest.tms_stime;
26
27 }
28
29
30
31 double timenow(void)
32 {
33 struct timeval timestr;
34 void *Tzp=0;
35 gettimeofday(&timestr, Tzp);
36
37 return (double)timestr.tv_sec+1.0E-06*(double)timestr.tv_usec;
38 }
39

  ViewVC Help
Powered by ViewVC 1.1.22