Created
March 22, 2014 08:30
-
-
Save vanglian/9703187 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
#!/usr/bin/python | |
#A Small example of how to convert time in seconds to Days Hours & Minutes, Seconds | |
TimeInSeconds = 60000 | |
Days, Remainder = divmod(TimeInSeconds,24*60*60) | |
Hours, Remainder = divmod(Remainder, 60*60) | |
Minutes, Remainder = divmod (Remainder, 60) | |
Seconds = Remainder | |
print (int(Days)," Days ",int(Hours)," Hours ", int(Minutes)," Minutes ", round(Seconds)," Seconds ") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment