Set $CMD_DURATION to milliseconds. Fixes #1585

Changing $CMD_DURATION to be in milliseconds as discussed in #1585