Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import time
- # ATTRIBUTES OUTPUT
- time.altzone # 18000
- time.daylight # 1
- time.timezone # 21600
- time.tzname # ('Central Standard Time', 'Central Daylight Time')
- # FUNCTIONS OUTPUT
- time.asctime() # Thu Mar 23 22:54:26 2017
- time.clock() # 1.4661144302312795e-06
- time.ctime() # Thu Mar 23 22:54:26 2017
- time.gmtime() # time.struct_time(tm_year=2017, tm_mon=3, tm_mday=24, tm_hour=3, tm_min=54, tm_sec=26, tm_wday=4, tm_yday=83, tm_isdst=0)
- time.localtime() # time.struct_time(tm_year=2017, tm_mon=3, tm_mday=23, tm_hour=22, tm_min=54, tm_sec=26, tm_wday=3, tm_yday=82, tm_isdst=1)
- time.monotonic() # 51025.977
- time.perf_counter() # 0.0003797236374299014
- time.process_time() # 0.09360059999999999
- time.time() # 1490327666.8242538
- # FUNCTIONS w/ PARAMETERS OUTPUT
- time.get_clock_info(name) # namespace(adjustable=True, implementation='GetSystemTimeAsFileTime()', monotonic=False, resolution=0.015600099999999999)
- # Required Parameter
- # string
- # Available Options
- # 'clock'
- # 'monotonic'
- # 'perf_counter'
- # 'process_time'
- # 'time'
- time.mktime(t) # 1490328764.0
- # Required Parameter
- # time.struct_time()
- # Available Options
- # time.gmtime(), time.localtime(), time.strptime()
- # time.struct_time(tm_year=2017, tm_mon=3, tm_mday=23, tm_hour=23, tm_min=12, tm_sec=44, tm_wday=3, tm_yday=82, tm_isdst=1)
- time.sleep(seconds) # None
- # Required Parameter
- # int or float
- time.strftime(format[, time]) # 'Thu, 28 Jun 2001 14:17:15 +0000'
- # Required Parameter
- # string - format
- # Example
- # "%a, %d %b %Y %H:%M:%S +0000"
- # Optional Parameter
- # int/float - Posix timestamp
- # Example
- # time.time()
- # 1490327666.8242538
- time.strptime(string[, format]) # time.struct_time(tm_year=2000, tm_mon=11, tm_mday=30, tm_hour=0, tm_min=0, tm_sec=0, tm_wday=3, tm_yday=335, tm_isdst=-1)
- # Required Parameter
- # string - date
- # Example
- # "30 Nov 00"
- # Optional Parameter
- # string - format
- # Example
- # "%d %b %y"
- # ---------------------------------------------------------
- # CLASS Output
- # time.struct_time() time.struct_time(tm_year=2000, tm_mon=11, tm_mday=30, tm_hour=0, tm_min=0, tm_sec=0, tm_wday=3, tm_yday=335, tm_isdst=-1)
- # Returned by time.gmtime(), time.localtime(), time.strptime()
- # Attributes
- # count
- # index
- # n_fields
- # n_sequence_fields
- # n_unnamed_fields
- # tm_hour
- # tm_isdst
- # tm_mday
- # tm_min
- # tm_mon
- # tm_sec
- # tm_wday
- # tm_yday
- # tm_year
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement