SURFEX v8.1
General documentation of Surfex
jio_time.c
Go to the documentation of this file.
1 #include <stdio.h>
2 #include <unistd.h>
3 #include <fcntl.h>
4 #include <string.h>
5 #include <stdlib.h>
6 #ifdef RS6K
7 #include <dlfcn.h>
8 #endif
9 #include <sys/time.h>
10 
11 long long int jio_time_()
12 {
13  long long int elapsed;
14 #ifdef RS6K
15  timebasestruct_t t_start;
16  int sec, n_sec;
17  read_real_time(&t_start, TIMEBASE_SZ);
18  time_base_to_time(&t_start, TIMEBASE_SZ);
19  sec = t_start.tb_high;
20  n_sec = t_start.tb_low;
21  elapsed = (long long int) sec*1000000000 + (long long int)n_sec;
22 #else
23  elapsed = 0;
24 #endif
25  return elapsed;
26 }
long long int jio_time_()
Definition: jio_time.c:11