]> rtime.felk.cvut.cz Git - frescor/frsh-include.git/blobdiff - frsh_time.h
Merge of the synchronized workload changes
[frescor/frsh-include.git] / frsh_time.h
index 86dc48ce322b5e48cbca419918280c6ae631d424..aeb0c594d7b25482f07438f95acf3f02b911d959 100644 (file)
 //  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
 //==============================================
@@ -298,6 +292,48 @@ static inline long frsh_abs_time_to_usec(frsh_abs_time_t interval)
     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
  ******************************************/