def find_period(traj):
    """Find approximate period of oscillation using the last two
    peak event times in voltage"""
    try:
        evs = traj.getEventTimes('peak_ev')
        return evs[-1] - evs[-2]
    except:
        return 0