Created
March 27, 2017 10:04
-
-
Save yevgnenll/61a4fec2064ffa92a1aea637de0d38d3 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
import time | |
import sys | |
def elapsed_time(func): | |
def elsapse(*args, **kwargs): | |
start = time.time() | |
result = func(*args, **kwargs) | |
end = time.time() | |
print("============================================================================") | |
print("함수이름:",func.__name__) | |
print("걸린시간:",(end - start)/(24*60*60*1000) ,"초") | |
if len(args) >0: | |
print("들어온값:", args) | |
if len(kwargs): | |
print("들어온 값:", kwargs) | |
print("이 함수로 실행할 결과:", result) | |
print("============================================================================") | |
return result | |
return elsapse |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
와... *args에 **kwargs.. 한번 반영해보겠습니다.