0
I’m checking how long a API
delay to respond and I’m picking up the values at the beginning with microtime(true)
and at the end with microtime(true)
therefore;
$start = microtime(true);
...
...
...
...
$end = microtime(true);
To convert to seconds the current code divides the subtraction of the values by 60:
($end - $start) / 60
But I’ve done a lot of research and all I can find is to divide the value by 1000000
, how do I get the difference of these values in segundos
?
But with the
($end - $start)
you already get the right seconds?– I_like_trains
You’ve tried it this way
date("s", $end - $start);
?– gato
@I_like_trains I don’t know rs, so the question.
– RFL
https://stackoverflow.com/a/6468171/6510304
– Don't Panic