https://blog.habets.se/2010/09/gettimeofday-should-never-be-used-to-measure-time.html?tdsourcetag=s_pcqq_aiomsg