patch 9.0.1411: accuracy of profiling is not optimal
Problem: Accuracy of profiling is not optimal.
Solution: Use CLOCK_MONOTONIC if possible. (Ernie Rael, closes #12129)
diff --git a/src/evalfunc.c b/src/evalfunc.c
index 0f266dc..29206b9a 100644
--- a/src/evalfunc.c
+++ b/src/evalfunc.c
@@ -6145,6 +6145,13 @@
0
#endif
},
+ {"prof_nsec",
+#ifdef HAVE_TIMER_CREATE
+ 1
+#else
+ 0
+#endif
+ },
{"reltime",
#ifdef FEAT_RELTIME
1
@@ -8226,7 +8233,7 @@
# if defined(MSWIN)
*x = (UINT32_T)res.LowPart;
# else
- *x = (UINT32_T)res.tv_usec;
+ *x = (UINT32_T)res.tv_fsec;
# endif
#else
*x = vim_time();