import time


def past_seconds(time_started: int):
    """从参数表示的时间开始，已经流逝的时间。

    如果 time_started 比当前时间晚，则返回 0，不返回负值。

    time_started: posix timestamp.
    """
    diff = time.time() - time_started
    if diff < 0:
        return 0

    return diff