hrtime

Get the system's high resolution time

Syntax

hrtime ( [ bool $get_as_number = FALSE ] ) : mixed

Parameters

get_as_number

Whether the high resolution time should be returned as array or number.

Return

Returns an array of integers in the form [seconds, nanoseconds], if the parameter get_as_number is false. Otherwise the nanoseconds are returned as integer (64bit platforms) or float (32bit platforms).

Examples

1 · void

<?

$array = hrtime();
print_r($array);

?>
Array
(
    [0] => 2646697
    [1] => 391779688
)

2 · get_as_number

<?

$get_as_number = true;
$number = hrtime($get_as_number);
echo $number;

?>
2646697449922619

__halt_compiler

connection_aborted

connection_status

constant

define

defined

die

eval

exit

highlight_file

highlight_string

ignore_user_abort

pack

php_strip_whitespace

show_source

sleep

sys_getloadavg

time_nanosleep

time_sleep_until

uniqid

unpack

usleep

PHP

Home Menu