public VoltTable[] run(short station, long ttl_seconds) throws VoltAbortException {
        voltQueueSQL(getLastDeparts, station);

        // For each station, calculate the wait time between departures
        final StationStats stats = getStationStats(station, voltExecuteSQL());
        voltQueueSQL(updateWaitTime,
                        stats.station,
                        stats.lastDepartTime,
                        stats.totalTime,
                        stats.totalEntries);
        // Prune old data
        voltQueueSQL(deleteOldData, -ttl_seconds);

        return voltExecuteSQL(true);
    }
public VoltTable [ ] run ( short station , long ttl_seconds ) throws VoltAbortException { voltQueueSQL ( getLastDeparts , station ) ; final StationStats stats = getStationStats ( station , voltExecuteSQL ( ) ) ; voltQueueSQL ( updateWaitTime , stats . station , stats . lastDepartTime , stats . totalTime , stats . totalEntries ) ; voltQueueSQL ( deleteOldData , - ttl_seconds ) ; return voltExecuteSQL ( true ) ; }
Calculate the current average wait time for each station and prune old wait time calculations.
@param ttl_seconds Time-to-live for wait time calculations, results older than this will be deleted.
@return
@throws VoltAbortException