// -----------------------------------------------------------------------
-// Copyright (C) 2006 - 2008 FRESCOR consortium partners:
+// Copyright (C) 2006 - 2009 FRESCOR consortium partners:
//
// Universidad de Cantabria, SPAIN
// University of York, UK
// by the GNU General Public License. This exception does not
// however invalidate any other reasons why the executable file might be
// covered by the GNU Public License.
-// As a special exception, if you include this header file into source
-// files to be compiled, this header file does not by itself cause
-// the resulting executable to be covered by the GNU General Public
-// License. This exception does not however invalidate any other
-// reasons why the executable file might be covered by the GNU General
-// Public License.
// -----------------------------------------------------------------------
//frsh_spare_capacity_types.h
//==============================================
return fosa_rel_time_add(t1, t2);
}
+static inline frsh_rel_time_t frsh_rel_time_incr(frsh_rel_time_t t1, frsh_rel_time_t t2)
+{
+ return fosa_rel_time_add(t1, t2);
+}
+
+
+
+
/**
* frsh_abs_time_decr
*
return fosa_abs_time_extract_interval(past, future);
}
+
+static inline frsh_rel_time_t frsh_abs_time_subtract(frsh_abs_time_t past, frsh_abs_time_t future)
+{
+ return fosa_abs_time_extract_interval(past, future);
+}
+
+
+
+
/**
* frsh_rel_time_times_integer()
*
/**
* frsh_rel_time_times_integer()
*
- * Multiplies a relative time by an integer
+ * Divides a relative time by an integer
**/
static inline frsh_rel_time_t frsh_rel_time_divided_by_integer(frsh_rel_time_t time, long divider)
{
return fosa_abs_time_to_usec(interval);
}
+/**
+ * frsh_nsec_to_rel_time()
+ *
+ * Convert an integer value of microseconds into an absolute instant.
+ */
+static inline frsh_rel_time_t frsh_nsec_to_rel_time(long nsec)
+{
+ return fosa_nsec_to_rel_time(nsec);
+}
+
+
+/**
+ * frsh_rel_time_to_nsec()
+ *
+ * Convert a relative interval into an integer number of microseconds.
+ */
+static inline long frsh_rel_time_to_nsec(frsh_rel_time_t interval)
+{
+ return fosa_rel_time_to_nsec(interval);
+}
+
+/**
+ * frsh_nsec_to_abs_time()
+ *
+ * Convert an integer value of microseconds into an absolute instant.
+ */
+static inline frsh_abs_time_t frsh_nsec_to_abs_time(long nsec)
+{
+ return fosa_nsec_to_abs_time(nsec);
+}
+
+
+/**
+ * frsh_abs_time_to_nsec()
+ *
+ * Convert a relative interval into an integer number of microseconds.
+ */
+static inline long frsh_abs_time_to_nsec(frsh_abs_time_t interval)
+{
+ return fosa_abs_time_to_nsec(interval);
+}
+
/******************************************
* Conversion to-from POSIX timespec format
******************************************/