To use the time module you must first import:
Import time
1, time.time (): print the current timestamp
represented from 1970 to the present through the second speed.
2, time.localtime (secs): time stamp is converted to a current time zone struct_time, when secs to provide, based on the time the current places.
Figures in parentheses may be Riga, returns the number corresponding to the time:
You can see contains many variables, you can use spliced forms represent time. For example:
first the time.time () assigned to the variable A
3.time.gmtime (): and localtime () method similar to, gmtime, () method returns the UTC time, i.e. Greenwich Mean Time, GMT eight hours later than
4 .time.mktime (): the conversion of a timestamp struct_time:
. 5, the time.sleep (secs): delayed thread specified amount of time, in seconds.
. 6, that time.asctime (): it indicates a time or ancestral struct_time as expressed in this form: Sat Aug 10 14:54:25 2019. If there are no parameters into the parameters, it will be time.localtime () as a parameter.
7, time.ctime (secs) a time stamp bar (floating point calculations in seconds) that time.asctime into () in the form, or if the parameter is not time.time None will default parameters. It acts time.asctime (time.localtime (secs)).
8, time.strftime (format [, t]): represents time tuples or struct_time (as indicated by time.localtime () and time.gmtime ()) returns a character string is converted to time format if not t specified, the incoming time.localtime ().
9, time.strptime (string [, format]) is time.strftime (format [, t]) reverse operation.