From 05b8021db4e34ed7742b9eb69c531dad5aaf0278 Mon Sep 17 00:00:00 2001 From: Leon Arber Date: Fri, 27 Jan 2006 10:32:04 -0500 Subject: [svn-r11895] Purpose: Bug fix. Description: Seems like some compilers don't like the "inline" function spec. Solution: Removed the inline description for the sub_time function. Platforms tested: heping and tg-login. Misc. update: --- perform/pio_timer.c | 25 ++++++++++++++++--------- 1 file changed, 16 insertions(+), 9 deletions(-) diff --git a/perform/pio_timer.c b/perform/pio_timer.c index 027b536..a528e5d 100644 --- a/perform/pio_timer.c +++ b/perform/pio_timer.c @@ -38,6 +38,22 @@ /* global variables */ pio_time *timer_g; /* timer: global for stub functions */ +/* + * Function: sub_time + * Purpose: Struct two time values, and return the difference, in microseconds + * + * Note that the function assumes that a > b + * Programmer: Leon Arber, 1/27/06 + */ +static double sub_time(struct timeval* a, struct timeval* b) +{ + return (((double)a->tv_sec + + ((double)a->tv_usec) / MICROSECOND) - + ((double)b->tv_sec + + ((double)b->tv_usec) / MICROSECOND)); +} + + /* * Function: pio_time_new * Purpose: Build us a brand, spankin', new performance time object. @@ -235,15 +251,6 @@ get_time(pio_time *pt, timer_type t) return pt->total_time[t]; } -/* Assumes that a > b */ -static inline double sub_time(struct timeval* a, struct timeval* b) -{ - ((double)a->tv_sec + - ((double)a->tv_usec) / MICROSECOND) - - ((double)b->tv_sec + - ((double)b->tv_usec) / MICROSECOND); -} - #endif /* H5_HAVE_PARALLEL */ #ifdef STANDALONE #include "pio_standalone.c" -- cgit v0.12