Last active
August 29, 2015 14:23
-
-
Save devendranaga/1921423764be616364fc to your computer and use it in GitHub Desktop.
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
#!/usr/bin/python | |
# only has seconds resolution | |
class Profile: | |
def profile_start(self): | |
self.start = time.gmtime() | |
def profile_stop(self): | |
self.stop = time.gmtime() | |
def profile_display(self): | |
secs_elapsed = ((self.stop.tm_hour * 60 * 60) + (self.stop.tm_min * 60) + (self.stop.tm_sec)) - ((self.start.tm_hour * 60 * 60) + (self.start.tm_min * 60) + (self.start.tm_sec)) | |
print "executed for " + str(secs_elapsed) + " seconds" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment