aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorBjoern B. Brandenburg <bbb@cs.unc.edu>2011-01-30 12:18:26 -0500
committerBjoern B. Brandenburg <bbb@cs.unc.edu>2011-02-03 17:40:16 -0500
commit86b445e39c3c7eed076b01795b17f34481517288 (patch)
tree88db1c398fde6882328bcba74fb49945fa4bce24 /include
parent46f3b11a1f49d49120415b56b6f627c66e4b4d1b (diff)
Export wctime() and cputime() from rtspin to library clients
The timing functions are quite handy when building benchmark tasks. Avoid copy&paste reuse by making them available via the library.
Diffstat (limited to 'include')
-rw-r--r--include/litmus.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/litmus.h b/include/litmus.h
index 2a26a4a..3b762db 100644
--- a/include/litmus.h
+++ b/include/litmus.h
@@ -111,6 +111,12 @@ static inline lt_t ms2lt(unsigned long milliseconds)
111 return __NS_PER_MS * milliseconds; 111 return __NS_PER_MS * milliseconds;
112} 112}
113 113
114/* CPU time consumed so far in seconds */
115double cputime(void);
116
117/* wall-clock time in seconds */
118double wctime(void);
119
114/* semaphore allocation */ 120/* semaphore allocation */
115 121
116static inline int open_fmlp_sem(int fd, int name) 122static inline int open_fmlp_sem(int fd, int name)