Fast Auxiliary Space Preconditioning  1.8.4 Feb/15/2016
timing.c
Go to the documentation of this file.
1 
6 #include <time.h>
7 
8 #ifdef _OPENMP
9 #include <omp.h>
10 #endif
11 
12 #include "fasp.h"
13 
14 /*---------------------------------*/
15 /*-- Public Functions --*/
16 /*---------------------------------*/
17 
28 void fasp_gettime (REAL *time)
29 {
30  if ( time != NULL ) {
31 #ifdef _OPENMP
32  *time = omp_get_wtime();
33 #else
34  *time = (REAL) clock() / CLOCKS_PER_SEC;
35 #endif
36  }
37 }
38 
39 /*---------------------------------*/
40 /*-- End of File --*/
41 /*---------------------------------*/
#define REAL
Definition: fasp.h:67
Main header file for FASP.
void fasp_gettime(REAL *time)
Get system time.
Definition: timing.c:28