Problem solved. My mistake
The only place where "timespan" is changed is also in @gfx. But, part of handling that change was switching to an off-screen buffer to redraw a grid based on the timespan. And I did not switch back to the main screen until later. So my "gfx_prinf()" above was going into the off-screen buffer.
When I added the missing "gfx_dest =-1;" the problem was resolved.
Sorry for wasting your time.