Advertisement
Guest User

Untitled

a guest
Mar 24th, 2017
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.00 KB | None | 0 0
  1. import time
  2.  
  3. # ATTRIBUTES OUTPUT
  4. time.altzone # 18000
  5. time.daylight # 1
  6. time.timezone # 21600
  7. time.tzname # ('Central Standard Time', 'Central Daylight Time')
  8.  
  9.  
  10.  
  11. # FUNCTIONS OUTPUT
  12. time.asctime() # Thu Mar 23 22:54:26 2017
  13. time.clock() # 1.4661144302312795e-06
  14. time.ctime() # Thu Mar 23 22:54:26 2017
  15. 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)
  16. 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)
  17. time.monotonic() # 51025.977
  18. time.perf_counter() # 0.0003797236374299014
  19. time.process_time() # 0.09360059999999999
  20. time.time() # 1490327666.8242538
  21.  
  22.  
  23.  
  24. # FUNCTIONS w/ PARAMETERS OUTPUT
  25. time.get_clock_info(name) # namespace(adjustable=True, implementation='GetSystemTimeAsFileTime()', monotonic=False, resolution=0.015600099999999999)
  26. # Required Parameter
  27. # string
  28. # Available Options
  29. # 'clock'
  30. # 'monotonic'
  31. # 'perf_counter'
  32. # 'process_time'
  33. # 'time'
  34.  
  35. time.mktime(t) # 1490328764.0
  36. # Required Parameter
  37. # time.struct_time()
  38. # Available Options
  39. # time.gmtime(), time.localtime(), time.strptime()
  40. # 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)
  41.  
  42. time.sleep(seconds) # None
  43. # Required Parameter
  44. # int or float
  45.  
  46. time.strftime(format[, time]) # 'Thu, 28 Jun 2001 14:17:15 +0000'
  47. # Required Parameter
  48. # string - format
  49. # Example
  50. # "%a, %d %b %Y %H:%M:%S +0000"
  51. # Optional Parameter
  52. # int/float - Posix timestamp
  53. # Example
  54. # time.time()
  55. # 1490327666.8242538
  56.  
  57. 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)
  58. # Required Parameter
  59. # string - date
  60. # Example
  61. # "30 Nov 00"
  62. # Optional Parameter
  63. # string - format
  64. # Example
  65. # "%d %b %y"
  66.  
  67. # ---------------------------------------------------------
  68.  
  69. # CLASS Output
  70. # 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)
  71. # Returned by time.gmtime(), time.localtime(), time.strptime()
  72.  
  73. # Attributes
  74. # count
  75. # index
  76. # n_fields
  77. # n_sequence_fields
  78. # n_unnamed_fields
  79. # tm_hour
  80. # tm_isdst
  81. # tm_mday
  82. # tm_min
  83. # tm_mon
  84. # tm_sec
  85. # tm_wday
  86. # tm_yday
  87. # tm_year
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement