Display stats to stdout.
        Refresh every duration second.

def update(self,
               stats,
               duration=3):
        """Display stats to stdout.
        Refresh every duration second.
        """
        for plugin, attribute in self.plugins_list:
            # Check if the plugin exist and is enable
            if plugin in stats.getPluginsList() and \
               stats.get_plugin(plugin).is_enable():
                stat = stats.get_plugin(plugin).get_export()
            else:
                continue
            # Display stats
            if attribute is not None:
                # With attribute
                try:
                    printandflush("{}.{}: {}".format(plugin, attribute,
                                                     stat[attribute]))
                except KeyError as err:
                    logger.error("Can not display stat {}.{} ({})".format(plugin, attribute, err))
            else:
                # Without attribute
                printandflush("{}: {}".format(plugin, stat))

        # Wait until next refresh
        if duration > 0:
            time.sleep(duration)