presto-main/src/main/java/io/prestosql/execution/QueryStateTimer.java/QueryStateTimer/getQueuedTime
class QueryStateTimer:    public Duration getQueuedTime()
    {
        Duration queuedTime = this.queuedTime.get();
        if (queuedTime != null) {
            return queuedTime;
        }

        // if queue time is not set, the query is still queued
        return getElapsedTime();
    }