Now that we have obtained two different timestamps from the system, is there any way to convert this difference into seconds plus milliseconds? ?
认证0级讲师
function getMillisecond() { list($t1, $t2) = explode(' ', microtime()); return (float)sprintf('%.0f',(floatval($t1)+floatval($t2))*1000); } echo getMillisecond();
Find a function online and give it a try
PHP’s timestamp can only go to the second level. If you add milliseconds, add 000 at the end
Find a function online and give it a try
PHP’s timestamp can only go to the second level. If you add milliseconds, add 000 at the end