def convert_seconds(self, time_seconds):
        """Convert a time in seconds to the device timestamp units.

        KATCP v4 and earlier, specified all timestamps in milliseconds. Since
        KATCP v5, all timestamps are in seconds. If the device KATCP version
        has been detected, this method converts a value in seconds to the
        appropriate (seconds or milliseconds) quantity. For version smaller
        than V4, the time value will be truncated to the nearest millisecond.

        """
        if self.protocol_flags.major >= SEC_TS_KATCP_MAJOR:
            return time_seconds
        else:
            device_time = time_seconds * SEC_TO_MS_FAC
            if self.protocol_flags.major < FLOAT_TS_KATCP_MAJOR:
                device_time = int(device_time)
            return device_time
Convert a time in seconds to the device timestamp units.

        KATCP v4 and earlier, specified all timestamps in milliseconds. Since
        KATCP v5, all timestamps are in seconds. If the device KATCP version
        has been detected, this method converts a value in seconds to the
        appropriate (seconds or milliseconds) quantity. For version smaller
        than V4, the time value will be truncated to the nearest millisecond.