def roundToInt(timePos: float) -> int: return int(decimal.Decimal(timePos).quantize(decimal.Decimal(1), rounding=decimal.ROUND_HALF_UP))