

This can be inaccurate on servers that run ntp to syncronise the serversĪnd there’s SNTP (Simple NTP), And Windows uses it’s own version Īll Microsoft Windows versions since Windows 2000 and Windows XP include the Windows Time service (“W32Time”), which has the ability to sync the computer clock to an NTP server. this on NTP (Network Time Protocol) Īll these timing scripts rely on microtime which relies on gettimebyday(2) It does indeed seem to be related to how time is handled. I’ve never worried much about such small amounts of time and so never looked much into it. I’m inclined to think that floats are not the problem but more likely microtime() is reporting time with very small precision in the first place. $dur = countDuration($start, microtime()) Īnd guess what? The same problem persists on the 32-bit Windows system - I get either 0.015625 or 0. But I looked at the source of this package and it uses the same method of counting time as I was contemplating earlier - textual microtime() result + bcsub() to calculate the difference.

#Xampp for windows xp 32 bit php 5.4 code#
Is this for RYO benchmarking? If so there may be a package out there that has everything already figured out.Īn external PEAR library is too much for my needs, occasionally I just want to inject 2-3 lines of simple code to benchmark a piece of code without any external dependencies.
