Change function time.clock() to time.time(), because time.clock() works only on windows version.

This commit is contained in:
pablo@pabloalcantara.eti.br
2012-05-16 15:18:50 -03:00
parent c18a9dcdb4
commit 8e16333753
+3 -3
View File
@@ -18,7 +18,7 @@ def encode(albumPath):
musicFinalFiles=[]
musicTempFiles=[]
encoder =""
startAlbumTime=time.clock()
startAlbumTime=time.time()
ifencoded=0
if not os.path.exists(tempDirEncode):
@@ -89,7 +89,7 @@ def encode(albumPath):
def command(encoder,musicSource,musicDest,albumPath):
return_code=1
cmd=''
startMusicTime=time.clock()
startMusicTime=time.time()
if headphones.ENCODER == 'lame':
if headphones.ADVANCEDENCODER =='':
cmd=encoder + ' -h'
@@ -128,7 +128,7 @@ def command(encoder,musicSource,musicDest,albumPath):
logger.info('Music "%s" encoded in %s' % (musicSource,getTimeEncode(startMusicTime)))
def getTimeEncode(start):
seconds =int(time.clock()-start)
seconds =int(time.time()-start)
hours = seconds / 3600
seconds -= 3600*hours
minutes = seconds / 60