File: timer.c

package info (click to toggle)
ghemical 0.82-1
  • links: PTS
  • area: main
  • in suites: woody
  • size: 9,448 kB
  • ctags: 18,571
  • sloc: ansic: 68,828; cpp: 51,774; fortran: 35,324; sh: 2,505; makefile: 475; perl: 70
file content (68 lines) | stat: -rw-r--r-- 1,524 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
/* timer.f -- translated by f2c (version 19991025).
   You must link the resulting object file with the libraries:
	-lf2c -lm   (in that order)
*/

#include "f2c.h"

/* Table of constant values */

static integer c__1 = 1;

/* Subroutine */ int timer_(a, a_len)
char *a;
ftnlen a_len;
{
    /* Initialized data */

    static logical first = TRUE_;

    /* System generated locals */
    doublereal d__1, d__2;

    /* Builtin functions */
    integer i_indx(), s_cmp(), s_wsfe(), do_fio(), e_wsfe();

    /* Local variables */
    static doublereal t0, t1, t2;
    extern doublereal second_();

    /* Fortran I/O blocks */
    static cilist io___5 = { 0, 6, 0, "(2X,A,A,F7.2,A,F8.2)", 0 };
    static cilist io___6 = { 0, 6, 0, "(40X,'TIME LOST:',F7.2)", 0 };


    if (first) {

/*  DEFINE THE ZERO OF TIME */

	t0 = second_();
	t1 = t0;
	first = FALSE_;
    }

/*   THE ACT OF CALLING THIS ROUTINE COSTS 0.026 SECONDS */

    t0 += .026;
    t2 = second_();
    if (i_indx(a, "BEF", a_len, (ftnlen)3) == 0 && s_cmp(a, " ", a_len, (
	    ftnlen)1) != 0) {
	s_wsfe(&io___5);
	do_fio(&c__1, a, a_len);
	do_fio(&c__1, " INTERVAL:", (ftnlen)10);
	d__1 = t2 - t1;
	do_fio(&c__1, (char *)&d__1, (ftnlen)sizeof(doublereal));
	do_fio(&c__1, " INTEGRAL:", (ftnlen)10);
	d__2 = t2 - t0;
	do_fio(&c__1, (char *)&d__2, (ftnlen)sizeof(doublereal));
	e_wsfe();
    } else {
	s_wsfe(&io___6);
	d__1 = t2 - t1;
	do_fio(&c__1, (char *)&d__1, (ftnlen)sizeof(doublereal));
	e_wsfe();
    }
    t1 = t2 + .026;
    return 0;
} /* timer_ */