'Add a new item to the logs list.
If \'item\' is a \'new one\', add the new item at the beginning of
the logs list.
If \'item\' is not a \'new one\', update the existing item.
If event < peak_time the the alert is not setoff.'

def add(self, item_state, item_type, item_value, proc_list=None, proc_desc='', peak_time=6):

    proc_list = (proc_list or glances_processes.getalllist())
    item_index = self.__itemexist__(item_type)
    if (item_index < 0):
        self._create_item(item_state, item_type, item_value, proc_list, proc_desc, peak_time)
    else:
        self._update_item(item_index, item_state, item_type, item_value, proc_list, proc_desc, peak_time)
    return self.len()
