This function returns an array that contains current time information.

The meaning of the returning array keys:

* [sec] – seconds since the Unix Epoch
* [usec] – microseconds
* [minuteswest] – minutes west of Greenwich
* [dsttime] – type of dst correction

Syntax: gettimeofday(return_float)

Description:

The argument “return_float” is Optional. It Makes gettimeofday() return a float when it is set to true.

Example:
Code:

Array
(
[sec] => 1532178242
[usec] => 749390
[minuteswest] => 0
[dsttime] => 0
)
1532178242.7494

Output:

Array (
[sec] => 1302433638
[usec] => 351183
[minuteswest] => 0
[dsttime] => 0
)
1302433638.3516

eXTReMe Tracker