File tree Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -494,6 +494,7 @@ def run_day(
494494 refresh : bool ,
495495 dry_run : bool ,
496496 terminal_columns : int ,
497+ wait : float ,
497498):
498499 elapsed = defaultdict (list )
499500
@@ -542,6 +543,10 @@ def run_day(
542543 if e :
543544 update_cache (key , prog , "solutions" , e )
544545
546+ if wait is not None :
547+ print (f"{ CR } { CLEAR_EOL } waiting { wait :g} s..." , end = "" )
548+ time .sleep (wait )
549+
545550 if not e :
546551 continue
547552
@@ -760,6 +765,7 @@ def main():
760765 parser .add_argument ("-r" , "--refresh" , action = "store_true" , help = "relaunch solutions" )
761766 parser .add_argument ("-n" , "--dry-run" , action = "store_true" , help = "do not run" )
762767 parser .add_argument ("--no-build" , action = "store_true" , help = "do not build" )
768+ parser .add_argument ("-w" , "--wait" , type = float , help = "Wait seconds between each solution" )
763769
764770 parser .add_argument ("-C" , "--comparison" , action = "store_true" , help = "Show languages commparison" )
765771
@@ -896,6 +902,7 @@ def main():
896902 args .refresh ,
897903 args .dry_run ,
898904 terminal_columns ,
905+ args .wait ,
899906 )
900907
901908 if elapsed :
You can’t perform that action at this time.
0 commit comments