PHP uses the Gettimeofday function to return the current time and store it in an associative array.
This article mainly introduces PHP using the Gettimeofday function to return the current time and stored in the associative array method, involving
Php uses the gettimeofday function to return the current time and place it in the associated array.
This article describes how to use the gettimeofday function in php to return the current time and put it in the associated array. It involves the use
C language Settimeofday () function: Setting the current timestampheader file:
#include #include
To define a function:
int settimeofday (const struct Timeval *tv, const struct timezone);
Function Description:
PHP uses the Gettimeofday function to return the current time and store it in an associative array, and the PHP array function
This example describes how PHP uses the Gettimeofday function to return the current time and store it in an associative
The definition of struct timeval structure of struct timeval structure in time.h is as follows:
struct Timeval
{
__time_t tv_sec; /* Seconds. */
__suseconds_t tv_usec; /* microseconds. */
}; Where Tv_sec is epoch to the number of seconds to create
This article mainly introduces how php uses the gettimeofday function to return the current time and put it in the associated array. it involves the use of the gettimeofday function in php, for more information about how php uses the gettimeofday
This article mainly introduces how php uses the gettimeofday function to return the current time and put it in the associated array. it involves the use of the gettimeofday function in php, for more information about how php uses the gettimeofday
Php uses the gettimeofday function to return the current time and place it in the associated array. The php Array Function
This example describes how php uses the gettimeofday function to return the current time and put it in the associated array.
The example in this article describes how PHP uses the Gettimeofday function to return the current time and store it in an associative array. Share to everyone for your reference. The specific analysis is as follows:
English official description is
precise timing in microseconds
Long Long l1,l2,l3;
Timeval TV1;
Take a Time
Gettimeofday (&tv,null);
L1 = tv.tv_sec*1000*1000 + tv.tv_usec;
Execute some code, such as algorithm 1 ...
Second time taken
Gettimeofday (&tv,null);
L2 = tv.tv_sec*1000*1
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.