projects
/
fio.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
manpage: update URL links to HOWTO/README
[fio.git]
/
gettime.c
diff --git
a/gettime.c
b/gettime.c
index 85ba7cba8954aa3a70ae5e1faf9a76ab6ab22c72..628aad640810e4c01ef2892bd6c2158c0d5c84a2 100644
(file)
--- a/
gettime.c
+++ b/
gettime.c
@@
-402,8
+402,14
@@
uint64_t utime_since(const struct timeval *s, const struct timeval *e)
uint64_t utime_since_now(const struct timeval *s)
{
struct timeval t;
uint64_t utime_since_now(const struct timeval *s)
{
struct timeval t;
+#ifdef FIO_DEBUG_TIME
+ void *p = __builtin_return_address(0);
+ fio_gettime(&t, p);
+#else
fio_gettime(&t, NULL);
fio_gettime(&t, NULL);
+#endif
+
return utime_since(s, &t);
}
return utime_since(s, &t);
}
@@
-429,9
+435,14
@@
uint64_t mtime_since(const struct timeval *s, const struct timeval *e)
uint64_t mtime_since_now(const struct timeval *s)
{
struct timeval t;
uint64_t mtime_since_now(const struct timeval *s)
{
struct timeval t;
+#ifdef FIO_DEBUG_TIME
void *p = __builtin_return_address(0);
fio_gettime(&t, p);
void *p = __builtin_return_address(0);
fio_gettime(&t, p);
+#else
+ fio_gettime(&t, NULL);
+#endif
+
return mtime_since(s, &t);
}
return mtime_since(s, &t);
}