def METHOD_NAME(self, pos):
    rect = self.rect()
    x_norm = pos.x() / float(rect.width())
    y_norm = min(1.0 - (pos.y() / float(rect.height())), 0.99)
    unit = int(y_norm / 0.25)
    y_norm -= unit * 0.25
    y_norm *= 4.0
    x_norm = max(min(x_norm, 0.99), 0.0)
    y_norm = max(min(y_norm, 0.99), 0.0)
    j = 2.5 * (1.0 - y_norm)
    x_pow = 0.5 + (j * j / 2.5)
    f = math.pow(x_norm, x_pow)
    if unit == 0:  # seconds
        j = int(1.0 + f * 59)
        secs = min(j, 59)
    elif unit == 1:  # minutes
        j = int((1.0 + f * 60) * 60)
        secs = min(j, 3600)
    elif unit == 2:  # hours
        j = int((1.0 + f * 24) * 3600)
        secs = min(j, 3600 * 24)
    else:  # days
        j = int((1.0 + f * 7) * 3600 * 24)
        secs = min(j, 3600 * 24 * 7)
    return secs