def parse_outcar_time(lines):
    """Parse the cpu and wall time from OUTCAR.
    The mismatch between wall time and cpu time represents
    the turn-around time in VaspInteractive

    returns (cpu_time, wall_time)
    if the calculation is not finished, both will be None
    """
    cpu_time = None
    wall_time = None
    for line in lines:
        if "Total CPU time used (sec):" in line:
            cpu_time = float(line.split(":")[1].strip())
        if "Elapsed time (sec):" in line:
            wall_time = float(line.split(":")[1].strip())
    return cpu_time, wall_time