def refresh_modules(self, module_string=None, exact=True):
if not module_string:<EOL><INDENT>if time.time() > (self.last_refresh_ts + <NUM_LIT:0.1>):<EOL><INDENT>self.last_refresh_ts = time.time()<EOL><DEDENT>else:<EOL><INDENT>return<EOL><DEDENT><DEDENT>update_i3status = False<EOL>for name, module in self.output_modules.items():<EOL><INDENT>if (<EOL>module_string is None<EOL>or (exact and name == module_string)<EOL>or (not exact and name.startswith(module_string))<EOL>):<EOL><INDENT>if module["<STR_LIT:type>"] == "<STR_LIT>":<EOL><INDENT>if self.config["<STR_LIT>"]:<EOL><INDENT>self.log("<STR_LIT>".format(name))<EOL><DEDENT>module["<STR_LIT>"].force_update()<EOL><DEDENT>else:<EOL><INDENT>if self.config["<STR_LIT>"]:<EOL><INDENT>self.log("<STR_LIT>".format(name))<EOL><DEDENT>update_i3status = True<EOL><DEDENT><DEDENT><DEDENT>if update_i3status:<EOL><INDENT>self.i3status_thread.refresh_i3status()<EOL><DEDENT>
Update modules.
if module_string is None all modules are refreshed
if module_string then modules with the exact name or those starting
with the given string depending on exact parameter will be refreshed.
If a module is an i3status one then we refresh i3status.
To prevent abuse, we rate limit this function to 100ms for full
refreshes.