diff options
| author | Bjoern Brandenburg <bbb@mpi-sws.org> | 2017-03-10 12:07:50 -0500 |
|---|---|---|
| committer | Bjoern Brandenburg <bbb@mpi-sws.org> | 2017-03-10 12:07:50 -0500 |
| commit | d1aaa5c6f0898abc8505d25a8ce02d6f253f0d64 (patch) | |
| tree | 3238fd64c0f6561a7b4b0bef684046155cc0c30b /include | |
| parent | aacc5911afc3c9a42b3d1be66b91712a35ae530c (diff) | |
Add ns2ms() time conversion macro
Diffstat (limited to 'include')
| -rw-r--r-- | include/litmus.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/include/litmus.h b/include/litmus.h index 0f0929b..02c85b1 100644 --- a/include/litmus.h +++ b/include/litmus.h | |||
| @@ -162,6 +162,10 @@ int sporadic_clustered(lt_t e_ns, lt_t p_ns, int cluster); | |||
| 162 | * @param ns Time units in nanoseconds */ | 162 | * @param ns Time units in nanoseconds */ |
| 163 | #define ns2s(ns) ((ns)/1000000000LL) | 163 | #define ns2s(ns) ((ns)/1000000000LL) |
| 164 | 164 | ||
| 165 | /** Convert nanoseconds to milliseconds (truncating) | ||
| 166 | * @param ns Time units in nanoseconds */ | ||
| 167 | #define ns2ms(ns) ((ns)/1000000LL) | ||
| 168 | |||
| 165 | /** | 169 | /** |
| 166 | * Locking protocols for allocated shared objects | 170 | * Locking protocols for allocated shared objects |
| 167 | */ | 171 | */ |
