Fast Auxiliary Space Preconditioning 2.7.7 Aug/28/2022
Loading...
Searching...
No Matches
AuxTiming.c
Go to the documentation of this file.
1
13#include <time.h>
14
15#ifdef _OPENMP
16#include <omp.h>
17#endif
18
19#include "fasp.h"
20#include "fasp_functs.h"
21// #include "sys/time.h" //! call gettimeofday() for struct timeval on Linux system.
22
23/*---------------------------------*/
24/*-- Public Functions --*/
25/*---------------------------------*/
26
37void fasp_gettime(REAL* time)
38{
39 if (time != NULL) {
40#ifdef _OPENMP
41 *time = omp_get_wtime();
42#else
43 *time = (REAL)clock() / CLOCKS_PER_SEC;
44
45 //struct timeval t;
46 //gettimeofday(&t, NULL); // Get system time
47 //*time = t.tv_sec + t.tv_usec / 1000000.0;
48#endif
49 }
50}
51
52/*---------------------------------*/
53/*-- End of File --*/
54/*---------------------------------*/
void fasp_gettime(REAL *time)
Get system time.
Definition: AuxTiming.c:37
Main header file for the FASP project.
#define REAL
Definition: fasp.h:75