Instead of the longexposure command, make the exptime units a configuration parameter. The choices would be msec (scale 1000) or sec (scale 1).