comparison web/log.py @ 99:1a88bb989afb

fix off-by-one in remainder code
author Matt Johnston <matt@ucc.asn.au>
date Tue, 17 Jul 2012 21:58:49 +0800
parents fd9cfa6829fd
children fd8482365489
comparison
equal deleted inserted replaced
95:fd9cfa6829fd 99:1a88bb989afb
159 return value * 0.0625 159 return value * 0.0625
160 160
161 def time_rem(name, entries): 161 def time_rem(name, entries):
162 val_ticks = int(entries[name]) 162 val_ticks = int(entries[name])
163 val_rem = int(entries['%s_rem' % name]) 163 val_rem = int(entries['%s_rem' % name])
164 tick_wake = int(entries['tick_wake']) 164 tick_wake = int(entries['tick_wake']) + 1
165 tick_secs = int(entries['tick_secs']) 165 tick_secs = int(entries['tick_secs'])
166 return val_ticks + float(val_rem) * tick_secs / tick_wake 166 return val_ticks + float(val_rem) * tick_secs / tick_wake
167 167
168 def parse(lines): 168 def parse(lines):
169 169