Time module in Python provides various time-related functions. This module comes under Python’s standard utility modules, so there is no need to install it externally.
time.time() method of Time module is used to get the time in seconds since epoch. The handling of leap seconds is platform dependent.
Note: The epoch is the point where the time starts, and is platform dependent. On Windows and most Unix systems, the epoch is January 1, 1970, 00:00:00 (UTC) and leap seconds are not counted towards the time in seconds since the epoch. To check what the epoch is on a given platform we can use
Return type: This method returns a float value which represents the time in seconds since the epoch.
Time in milliseconds since epoch 1576071104408
Example 2: Using lambda function
Time in milliseconds since epoch 1576071316487
- Get Current Date and Time using Python
- Get Current Time in different Timezone using Python
- Python program to get Current Time
- Python program to find difference between current time and given time
- Get parent of current directory using Python
- Get current date using Python
- Get current Gold price using Python
- Get current timestamp using Python
- Python - Get Today's Current Day using Speech Recognition
- Get directory of current Python script
- Python VLC MediaPlayer - Getting Current media time
- PYGLET – Get Current Media Texture in Player
- Python | Find current weather of any city using openweathermap API
- Get Bit Coin price in real time using Python
- Create a GUI to get Sunset and Sunrise time using Python.
- How to get real-time Mutual Funds Information using Python?
- Python | Create an empty text file with current date as its name
- Change current working directory with Python
- How to find the current capacity of a list in Python
- Python - Elements Maximum till current index in List
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to firstname.lastname@example.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.