Trying to pin down why something is taking ~6 seconds by timing all the steps in triggers, and I was wondering if there is a way to get the timestamps in the report/chat window.
Audit() may be the easiest way because you can in-line that in the trigger expressions at each step. The alternative that occurs to me is to add Report Action traits and include in the report a Java/beanshell function for the timestamp.
What beanshell function that works in Vassal outputs a timestamp in a report?
Perhaps try the report
{"The time and date is now " + (new Date())}
See also here and java.util.Date.
Note, I’ve not tried this in the Vassal BeanShell interpreter. In the plain BeanShell interpreter, the following works
bsh% d = new Date();
bsh% print(d);
If you want a more modern approach, perhaps
{"Miliseconds since Epoch " + Calendar.getInstance().getTimeInMillis()}
See also java.util.Calendar.
Yours,
Christian