def _read_timestamp(file):
    """Get start and end time from timestamp csv file."""
    try:
        with open(file, 'r') as f:
            rows = f.readlines()
            starttime, endtime = float(rows[0].split(",")[0]), float(rows[-1].split(",")[0])
        starttime, endtime = starttime / (10**3), endtime / (10**3)
    except IOError:
        starttime, endtime = "Nan", "Nan"
    return starttime, endtime