Merge pull request #1979 from Mullin/head Use clock_gettime instead of gettimeofday, it's more efficiency on low power system