Python3 time. time () method, python3time. time
The time () returned by the Python time () method indicates the time floating point in seconds.
Note: even if the time is always returned as a floating point number, not all systems provide better precision when the time is less than 1 second. Although this function usually returns a non-decreasing value, it can return a smaller value between two calls after the system clock has returned.
Python3 time. time () syntax
The syntax of the time () method is as follows:
time.time()
Python3 time. time () parameter
Python3 time. time () Return Value
The time returned by this method, because the Floating Point Number of the second is represented since the New Era (in UTC.
Python3 time. time () instance
The following example shows how to use the time () method.
#!/usr/bin/python3import timeprint ("time.time(): %f " % time.time())print (time.localtime( time.time() ))print (time.asctime( time.localtime(time.time()) ))
When we run the above program, it will produce the following results:
time.time(): 1455519806.011433 time.struct_time(tm_year=2016, tm_mon=2, tm_mday=15, tm_hour=12, tm_min=33, tm_sec=26, tm_wday=0, tm_yday=46, tm_isdst=0)Mon Feb 15 12:33:26 2016
Address: http://www.manongjc.com/article/664.html
Read more:
Python3 time. strftime () method
Python3 time. sleep () method
Python3 time. mktime () method
Python3 time. localtime () method
Python3 time. gmtime () method
Python3 time. ctime () method
Python3 time. clock () method
Python3 time. asctime () method
Python3 time. altzone () method