by totony · 12y ago · 0 comments
For the precision of sleep, http://php.net/manual/en/function.time-nanosleep.php might be more appropriate
Also, you would only need to slightly clamp very important functions, so DoS attacks aren't that likely on it (and a constant timed function would also take the same time).
Accessing RAM requires system level access (privileged users, super user really) or running as the same user as the other process.
So unless the server is horribly misconfigured, or you exploit another vulnerability, reading from RAM isn't as likely as monitoring the CPU.
Again, I'm not saying this is practical. I'm saying it might be possible (even if improbable).
And don't get me wrong, I'm not saying "OMG YOU ARE BAD IF YOU DON"T PROTECT THIS RIGHT". I'm more leaning on the side of "if there's a chance, I assume someone could possibly figure out a way".