def compile_action_block(self, block):
    '\n        :type block: ActionBlock\n        :return:\n        '
    actions = {'stop': 0, 'pause': 1, 'stop-now': 2, 'continue': 3}
    targets = {'current-thread': 0, 'all-threads': 2}
    action = actions[block.action]
    target = targets[block.target]
    duration = 0
    if (block.duration is not None):
        duration = int((block.duration * 1000))
    test_action = JMX._get_action_block(action, target, duration)
    children = etree.Element('hashTree')
    self.__add_jsr_elements(children, block)
    return [test_action, children]
:type block: ActionBlock
:return:
def compile_action_block(self, block):
    '\n        :type block: ActionBlock\n        :return:\n        '
    actions = {'stop': 0, 'pause': 1, 'stop-now': 2, 'continue': 3}
    targets = {'current-thread': 0, 'all-threads': 2}
    action = actions[block.action]
    target = targets[block.target]
    duration = 0
    if (block.duration is not None):
        duration = int((block.duration * 1000))
    test_action = JMX._get_action_block(action, target, duration)
    children = etree.Element('hashTree')
    self.__add_jsr_elements(children, block)
    return [test_action, children]