// Measures Batch Mode acceleration factor // Does a task in GUI Mode then in Batch Mode // Log the times needed and their ratio run("Close All"); t=getTime(); doSomething(); tGui=getTime()-t; run("Close All"); setBatchMode(1); t=getTime(); doSomething(); setBatchMode(0); tBatch=getTime()-t; print ("GUI MODE", tGui); print ("BATCHMODE", tBatch); print ("ACCEL", toString(tGui/tBatch,2)); function doSomething() { v=1024; w=512; z=v/w; newImage("test", "RGB Ramp", v, v, 1); id=getImageID; for (i=0;i