hrtime
Description
The hrtime of Miscellaneous for PHP get the system's high resolution time.
Syntax
hrtime(
bool $as_number = false
): array|int|float|falseParameters
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 as_number is false. Otherwise the nanoseconds are returned as int (64bit platforms) or float (32bit platforms). Returns false on failure.
Examples
1 · void
<? $return = hrtime(); print_r($return);
Array
(
[0] => 35662276
[1] => 902249368
)
2 · as_number · false
<? $as_number = false; $return = hrtime($as_number); print_r($return);
Array
(
[0] => 35662276
[1] => 965879514
)
3 · as_number · true
<? $as_number = true; $return = hrtime($as_number); echo $return;
35662277024830084