@Override
    protected void doExecute(ExecutionContext context) {
        FieldValue value = context.getCurrentValue();
        if (value instanceof NumericFieldValue num) {
            double napSecs = num.getNumber().doubleValue();
            long doom = System.nanoTime() + (long)(1_000_000_000.0 * napSecs);
            while (doom > System.nanoTime()) {
                double pi = 3;
                for (int i = 0; i < 1000; i++) {
                    pi += nihlakanta(i);
                }
                context.getCache().put("Busy wait computing pi and store it to avoid jit optiming it away", pi);
            }
        }
    }
Utility expression that will busy-wait the amount of time given in the numeric field.
Non-numeric fields will be ignored.

@author baldersheim
indexinglanguage/src/main/java/com/yahoo/vespa/indexinglanguage/expressions/BusyWaitExpression.java