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