← Back to team overview

yade-dev team mailing list archive

[Branch ~yade-dev/yade/trunk] Rev 3026: Fix prediction of finish time in batch-mode.

 

------------------------------------------------------------
revno: 3026
committer: Anton Gladky <gladky.anton@xxxxxxxxx>
branch nick: yade
timestamp: Tue 2012-02-14 07:40:46 +0100
message:
  Fix prediction of finish time in batch-mode.
modified:
  core/main/yade-batch.in


--
lp:yade
https://code.launchpad.net/~yade-dev/yade/trunk

Your team Yade developers is subscribed to branch lp:yade.
To unsubscribe from this branch go to https://code.launchpad.net/~yade-dev/yade/trunk/+edit-subscription
=== modified file 'core/main/yade-batch.in'
--- core/main/yade-batch.in	2012-02-13 21:06:43 +0000
+++ core/main/yade-batch.in	2012-02-14 06:40:46 +0000
@@ -79,7 +79,7 @@
 			ret+='<td>'
 			if info['stopAtIter']>0:
 				ret+='<nobr>%2.2f%% done</nobr><br/><nobr>step %d/%d</nobr>'%(info['iter']*100./info['stopAtIter'],info['iter'],info['stopAtIter'])
-				finishTime = str(time.ctime(time.time()+int((round(info['stopAtIter'] - info['iter'])*info['speed']))))
+				finishTime = str(time.ctime(time.time()+int((round(info['stopAtIter'] - info['iter'])/info['speed']))))
 				ret+='<br/><font size="1"><nobr>%s finishes</nobr></font><br/>'%finishTime
 			else: ret+='<nobr>step %d</nobr>'%(info['iter'])
 			if info['realtime']!=0: ret+='<br/><nobr>speed %g/sec</nobr>'%(info['speed'])