Code Review
/
vpp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
Poison freed memory objects
[vpp.git]
/
src
/
vppinfra
/
time.h
diff --git
a/src/vppinfra/time.h
b/src/vppinfra/time.h
index
ead4b7d
..
ced9677
100644
(file)
--- a/
src/vppinfra/time.h
+++ b/
src/vppinfra/time.h
@@
-174,6
+174,16
@@
clib_cpu_time_now (void)
return ((u64) h << 32) | l;
}
return ((u64) h << 32) | l;
}
+#elif defined(_mips) && __mips == 64
+
+always_inline u64
+clib_cpu_time_now (void)
+{
+ u64 result;
+ asm volatile ("rdhwr %0,$31\n":"=r" (result));
+ return result;
+}
+
#else
#error "don't know how to read CPU time stamp"
#else
#error "don't know how to read CPU time stamp"
@@
-196,6
+206,9
@@
clib_time_now_internal (clib_time_t * c, u64 n)
return t * c->seconds_per_clock;
}
return t * c->seconds_per_clock;
}
+/* Maximum f64 value as max clib_time */
+#define CLIB_TIME_MAX (1.7976931348623157e+308)
+
always_inline f64
clib_time_now (clib_time_t * c)
{
always_inline f64
clib_time_now (clib_time_t * c)
{