Skip to content

Commit

Permalink
Add a ConsolePlus command to display cycles per second ("/cycles")
Browse files Browse the repository at this point in the history
  • Loading branch information
ccrock4t committed Jan 18, 2024
1 parent 624dee0 commit 545ab03
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions pynars/ConsolePlus.py
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,12 @@ def toggle_silent() -> None:
else "closed"
}.''')

@cmd_register('cycles')
def cycles(*args: List[str]) -> None:
'''Format: volume [volume:int 0~100]
Set the Output Volume of the console to control its output (same as OpenNARS)'''
current_NARS_interface.print_output(
type=PrintType.INFO, content=f'''Cycles per second is {current_NARS_interface.reasoner.cycles_per_second}.''')

@cmd_register(('volume'), (int, 100))
def volume(vol:int) -> None:
Expand Down

0 comments on commit 545ab03

Please sign in to comment.