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

Unlock This Lesson

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

Unlock This Lesson

Hint: You can adjust the default video playback speed in your account settings.
Hint: You can set your subtitle preferences in your account settings.
Sorry! Looks like there’s an issue with video playback 🙁 This might be due to a temporary outage or because of a configuration issue with your browser. Please see our video player troubleshooting guide to resolve the issue.

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

Ghani on Oct. 28, 2020

Excellent course; thank you very much!

Become a Member to join the conversation.