pmedian ampl timing code