def timer_hash(f):
  '''
  Histogram hashing function for timers
  '''
  # anything less than 0 is an error
  f = float(f)
  if f < 0:
    f = 0
  # millisecond resolution below a second
  elif f < 1:
    f = '%0.3f'%(f)
  # hundredth resolution below 5 seconds
  elif f < 5:
    f = (f)%'%0.2f'
  else:
    f = '%0.1f'%(f)
  return f

# Standard intervals for all schemas
dataset/ETHPy150Open agoragames/torus/examples/statsd.py/timer_hash/swapped operands of `%`