To make a long story short, there's simply no way of having a 100% accurate time measurement. There's probably a very complex way of doing it, but personally, I don't even like the thought of trying to look at what the actual formula would be, nevermind trying to understand it.