You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
21 lines
401 B
21 lines
401 B
import time
|
|
|
|
from config.config import init
|
|
from config.config import logger
|
|
|
|
start = int(time.time())
|
|
init()
|
|
|
|
def getRunTimeInt():
|
|
return (int(time.time()) - start)
|
|
|
|
def getRunTime():
|
|
return '程序已经执行%d秒' % (int(time.time()) - start)
|
|
|
|
|
|
def writeInfo(msg):
|
|
logger.info('%s\t(%s)' % (msg, getRunTime()))
|
|
|
|
|
|
def writeError(msg):
|
|
logger.error('%s\t(%s)' % (msg, getRunTime()))
|
|
|