projects
/
fio.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
fio: Introduce new constant thinkcycles option
[fio.git]
/
time.c
diff --git
a/time.c
b/time.c
index 7cbab6ff4f9ea1d029e7d9d2c0253278061ffe60..7f85c8de3bcbd2cb40eabe9c5f5c465551539b3a 100644
(file)
--- a/
time.c
+++ b/
time.c
@@
-38,6
+38,17
@@
uint64_t usec_spin(unsigned int usec)
return t;
}
+/*
+ * busy loop for a fixed amount of cycles
+ */
+void cycles_spin(unsigned int n)
+{
+ unsigned long i;
+
+ for (i=0; i < n; i++)
+ nop;
+}
+
uint64_t usec_sleep(struct thread_data *td, unsigned long usec)
{
struct timespec req;