ARGOBOTS  dce6e727ffc4ca5b3ffc04cb9517c6689be51ec5
abti_timer.h
Go to the documentation of this file.
1 /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */
2 /*
3  * See COPYRIGHT in top-level directory.
4  */
5 
6 #ifndef ABTI_TIMER_H_INCLUDED
7 #define ABTI_TIMER_H_INCLUDED
8 
9 /* Inlined functions for Timer */
10 
11 static inline double ABTI_get_wtime(void)
12 {
13  ABTD_time t;
14  ABTD_time_get(&t);
15  return ABTD_time_read_sec(&t);
16 }
17 
19 {
20 #ifndef ABT_CONFIG_DISABLE_ERROR_CHECK
21  ABTI_timer *p_timer;
22  if (timer == ABT_TIMER_NULL) {
23  p_timer = NULL;
24  } else {
25  p_timer = (ABTI_timer *)timer;
26  }
27  return p_timer;
28 #else
29  return (ABTI_timer *)timer;
30 #endif
31 }
32 
34 {
35 #ifndef ABT_CONFIG_DISABLE_ERROR_CHECK
36  ABT_timer h_timer;
37  if (p_timer == NULL) {
38  h_timer = ABT_TIMER_NULL;
39  } else {
40  h_timer = (ABT_timer)p_timer;
41  }
42  return h_timer;
43 #else
44  return (ABT_timer)p_timer;
45 #endif
46 }
47 
48 #endif /* ABTI_TIMER_H_INCLUDED */
ABTI_timer_get_ptr
static ABTI_timer * ABTI_timer_get_ptr(ABT_timer timer)
Definition: abti_timer.h:18
ABTD_time
struct timespec ABTD_time
Definition: abtd.h:103
ABTI_timer_get_handle
static ABT_timer ABTI_timer_get_handle(ABTI_timer *p_timer)
Definition: abti_timer.h:33
ABTI_timer
Definition: abti.h:531
ABT_TIMER_NULL
#define ABT_TIMER_NULL
Definition: abt.h:1116
ABT_timer
struct ABT_timer_opaque * ABT_timer
Timer handle type.
Definition: abt.h:1036
ABTD_time_read_sec
double ABTD_time_read_sec(ABTD_time *p_time)
Definition: abtd_time.c:35
ABTD_time_get
void ABTD_time_get(ABTD_time *p_time)
Definition: abtd_time.c:21
ABTI_get_wtime
static double ABTI_get_wtime(void)
Definition: abti_timer.h:11