Implements a function similar to {\ttfamily performance.\+now} (based on {\ttfamily process.\+hrtime}).

Modern browsers have a {\ttfamily window.\+performance} object with -\/ among others -\/ a {\ttfamily now} method which gives time in milliseconds, but with sub-\/millisecond precision. This module offers the same function based on the Node.\+js native {\ttfamily process.\+hrtime} function.

Using {\ttfamily process.\+hrtime} means that the reported time will be monotonically increasing, and not subject to clock-\/drift.

According to the \href{http://www.w3.org/TR/hr-time/}{\texttt{ High Resolution Time specification}}, the number of milliseconds reported by {\ttfamily performance.\+now} should be relative to the value of {\ttfamily performance.\+timing.\+navigation\+Start}.

In the current version of the module (2.\+0) the reported time is relative to the time the current Node process has started (inferred from {\ttfamily process.\+uptime()}).

Version 1.\+0 reported a different time. The reported time was relative to the time the module was loaded (i.\+e. the time it was first {\ttfamily require}d). If you need this functionality, version 1.\+0 is still available on NPM.\hypertarget{md_sfcode_node_modules_performance_now_README_autotoc_md20336}{}\doxysection{Example usage}\label{md_sfcode_node_modules_performance_now_README_autotoc_md20336}

\begin{DoxyCode}{0}
\DoxyCodeLine{var now = require("{}performance-\/now"{})}
\DoxyCodeLine{var start = now()}
\DoxyCodeLine{var end = now()}
\DoxyCodeLine{console.log(start.toFixed(3)) // the number of milliseconds the current node process is running}
\DoxyCodeLine{console.log((start-\/end).toFixed(3)) // \string~ 0.002 on my system }

\end{DoxyCode}


Running the now function two times right after each other yields a time difference of a few microseconds. Given this overhead, I think it\textquotesingle{}s best to assume that the precision of intervals computed with this method is not higher than 10 microseconds, if you don\textquotesingle{}t know the exact overhead on your own system.\hypertarget{md_sfcode_node_modules_performance_now_README_autotoc_md20337}{}\doxysection{License}\label{md_sfcode_node_modules_performance_now_README_autotoc_md20337}
performance-\/now is released under the \href{http://opensource.org/licenses/MIT}{\texttt{ MIT License}}. Copyright (c) 2017 Braveg1rl 