diff options
author | Bjoern B. Brandenburg <bbb@cs.unc.edu> | 2008-02-19 15:50:32 -0500 |
---|---|---|
committer | Bjoern B. Brandenburg <bbb@cs.unc.edu> | 2008-02-19 15:50:32 -0500 |
commit | 423ad81dd18d5e696537bce1bdf5772ad55490ca (patch) | |
tree | 130a9c8323aacf2669660aa76a927a20a09c80f2 /include | |
parent | 8cea6a4d179628e96d8d012f7a7f18d112fdb060 (diff) |
add unit conversion
Diffstat (limited to 'include')
-rw-r--r-- | include/litmus.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/include/litmus.h b/include/litmus.h index ef39262..5c50204 100644 --- a/include/litmus.h +++ b/include/litmus.h | |||
@@ -78,4 +78,13 @@ void exit_np(void); | |||
78 | int wait_for_ts_release(void); | 78 | int wait_for_ts_release(void); |
79 | int release_ts(lt_t *delay); | 79 | int release_ts(lt_t *delay); |
80 | 80 | ||
81 | #define __NS_PER_MS 1000000 | ||
82 | |||
83 | static inline lt_t ms2lt(unsigned long milliseconds) | ||
84 | { | ||
85 | return __NS_PER_MS * milliseconds; | ||
86 | } | ||
87 | |||
88 | |||
89 | |||
81 | #endif | 90 | #endif |