summaryrefslogtreecommitdiff
path: root/Ganlib/src/cletim_c.c
diff options
context:
space:
mode:
authorstainer_t <thomas.stainer@oecd-nea.org>2025-09-08 13:48:49 +0200
committerstainer_t <thomas.stainer@oecd-nea.org>2025-09-08 13:48:49 +0200
commit7dfcc480ba1e19bd3232349fc733caef94034292 (patch)
tree03ee104eb8846d5cc1a981d267687a729185d3f3 /Ganlib/src/cletim_c.c
Initial commit from Polytechnique Montreal
Diffstat (limited to 'Ganlib/src/cletim_c.c')
-rw-r--r--Ganlib/src/cletim_c.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/Ganlib/src/cletim_c.c b/Ganlib/src/cletim_c.c
new file mode 100644
index 0000000..addb037
--- /dev/null
+++ b/Ganlib/src/cletim_c.c
@@ -0,0 +1,20 @@
+/*****************************************/
+/* CLE-2000 API */
+/* AUTHOR: A. Hebert ; 16/07/10 */
+/*****************************************/
+
+#include <stdlib.h>
+#include <time.h>
+#include "cle2000.h"
+
+#ifdef _OPENMP
+#include <omp.h>
+void cletim_c(double *sec){
+ *sec = omp_get_wtime();
+}
+#else
+void cletim_c(double *sec){
+ long value = (long) clock();
+ *sec = (double) (value / CLOCKS_PER_SEC);
+}
+#endif