You can use datetime’s strftime function to get this. The problem is that time’s strftime accepts a timetuple that does not carry microsecond information.
from datetime import datetime
datetime.now().strftime("%H:%M:%S.%f")
Should do the trick!
More Related Contents:
- How do I get time of a Python program’s execution?
- Convert python datetime to epoch with strftime
- How to wait some time in pygame?
- How do I check the difference, in seconds, between two dates?
- Python strftime – date without leading 0?
- Making a countdown timer with Python and Tkinter?
- time.sleep — sleeps thread or process?
- High-precision clock in Python
- How do I get the current time in milliseconds in Python?
- How to run a function periodically in python
- Splitting timestamp column into separate date and time columns
- Python speed testing – Time Difference – milliseconds
- What exactly does the T and Z mean in timestamp?
- How do I change the file creation date of a Windows file?
- Week number of the month?
- Difference between Python datetime vs time modules
- Python get current time in right timezone [duplicate]
- Convert string into datetime.time object
- Python Time Delays
- How to compare times of the day?
- Get POSIX/Unix time in seconds and nanoseconds in Python?
- How do I strftime a date object in a different locale? [duplicate]
- How to get the seconds since epoch from the time + date output of gmtime()?
- Get part of day (morning, afternoon, evening, night) in Python dataframe
- Accurate timing of functions in python
- Use Python to find out if a timezone currently in daylight savings time [duplicate]
- Upper limit in Python time.sleep()?
- Python logging: use milliseconds in time format
- Python loop to run for certain amount of seconds
- Why does “%-d”, or “%-e” remove the leading space or zero?