apply_timeout usage?

I’m looking to be able to attempt to fill an image from input and have it timeout if it passes a certain threshold of time (1 second). I am aware of the apply_timeout command and intend to use it; however, its syntax is unclear and no examples of it are provided. After reading the argument documentation ("command",_timeout={ 0=no timeout | >0=with specified timeout (in seconds) }) this is what I determined to be the correct usage.

gmic apply_timeout "200,200,1,1,"x"",1

The above command outputs a blank 200x1x1x1 image and the timeout happens at 200 seconds. I would like it to output a 200x200x1x1 image with a standard x gradient that times out after 1 second.

TL;DR, I am confused on how to delineate the command and timeout arguments when using the apply_timeout function.

To me, I think the issue is that you can’t delineate them because the math parser of creating a new image is being compiled and executed. So, there’s no timeout there.

I’ve found that some randomly generated expressions freeze up the evaluator and I’m looking for a catch all to terminate GMIC if it’s ran for longer that 1-2 seconds. Any ideas?