Created
January 7, 2020 11:59
-
-
Save abdalmoez/8772490c24fcda0732f599a67ad896e2 to your computer and use it in GitHub Desktop.
Python convert nano seconds to string (hour, minute, seconds, ...)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def nsToStr(nanoseconds): | |
h=3.6e+12 | |
m=h/60 | |
s=m/60 | |
return str(int(d/h)) +':'+str(int((d%h)/m))+':'+ str(int((d%h)%m/s)) + '.' + str(int((d%h)%m%s)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
d is undefined