php’s microtime() function
php’s microtime( true ) function returns a floating point number of seconds since the UNIX epoch. On my computer each call takes about 200ns. The same is true of the time() and hrtime() functions. hrtime() is more modern and gives nanosecond resolution, so use it if possible. It’s available in php 7.3 and beyond. By … Read more