Locked learning resources

Join us and get access to thousands of tutorials and a community of expert Pythonistas.

Unlock This Lesson

Locked learning resources

This lesson is for members only. Join us and get access to thousands of tutorials and a community of expert Pythonistas.

Unlock This Lesson

Mastering Python's Built-in time Module (Summary)

Congratulations! You’ve learned the fundamental concepts surrounding date and time. It’s time for you to apply your newfound knowledge in your real world applications.

In this course, you learned how to:

  • Use a floating point number, representing seconds elapsed since the epoch, to deal with time
  • Manage time using tuples and struct_time objects
  • Convert between seconds, tuples, and timestamp strings
  • Suspend the execution of a Python thread
  • Measure performance using perf_counter()

If you want to continue learning more about using dates and times in Python, take a look at the following modules:

  • datetime: A more robust date and time module in Python’s standard library
  • timeit: A module for measuring the performance of code snippets
  • astropy: Higher precision datetimes used in astronomy

You might also want to check out How to Get and Use the Current Time in Python.

Download

Sample Code (.zip)

1.2 KB
Download

Course Slides (.pdf)

272.0 KB
Avatar image for Ghani

Ghani on Oct. 28, 2020

Excellent course; thank you very much!

Become a Member to join the conversation.