aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorBjoern Brandenburg <bbb@mpi-sws.org>2016-07-20 07:40:47 -0400
committerBjoern Brandenburg <bbb@mpi-sws.org>2016-07-20 07:42:41 -0400
commit98510c506a16b2a444eb6615ec8d78bc7c64e0aa (patch)
tree5e22518db1c73d6edf91f83c1ce8850403ec0092 /include
parent7ae970e73bc1d026bbf65a82c066aab79c860fe8 (diff)
Add litmus_clock() helper
Convenient wrapper for CLOCK_MONOTONIC -> lt_t.
Diffstat (limited to 'include')
-rw-r--r--include/litmus.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/include/litmus.h b/include/litmus.h
index 751b5ec..0f0929b 100644
--- a/include/litmus.h
+++ b/include/litmus.h
@@ -340,6 +340,14 @@ int lt_sleep(lt_t timeout);
340 */ 340 */
341void lt_sleep_until(lt_t wake_up_time); 341void lt_sleep_until(lt_t wake_up_time);
342 342
343/** Get the current time used by the LITMUS^RT scheduler.
344 * This is just CLOCK_MONOTONIC and hence the same
345 * as monotime(), but the result is given in nanoseconds
346 * as a value of type lt_t.
347 * @return CLOCK_MONOTONIC time in nanoseconds
348 */
349lt_t litmus_clock(void);
350
343/** 351/**
344 * Obtain CPU time consumed so far 352 * Obtain CPU time consumed so far
345 * @return CPU time in seconds 353 * @return CPU time in seconds