neovim/neovim — pull request #839 by aktau (2014-06-13 14:38:44+00:00)
Title: [RFC] viml: impl profiling on top of uv_hrtime()

Should be better than gettimeofday() since libuv uses higher resolution
clocks on most UNIX platforms. Libuv also tries to use monotonic clocks,
kernel bugs notwithstanding.

Necessary for Windows, which doesn't have gettimeofday().

Relevant issue: #831

References for `STATIC_ASSERT`:
- http://www.pixelbeat.org/programming/gcc/static_assert.html
- http://comments.gmane.org/gmane.comp.lib.gnulib.bugs/25870
- https://github.com/gagern/gnulib/blob/master/lib/verify.h
- https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61407