:type unit_value int

def tick(self, unit_value):
    """
    :type unit_value int
    """
    total_secs = round(time.time() - self.__prev_tick)
    if total_secs >= 1:
      self.__unit_per_sec = unit_value / total_secs - self.__unit_per_sec_prev
      self.__unit_per_sec_prev = unit_value
      self.__prev_tick = time.time()