Andriamanitra / coctus

Command line tool for playing clashes and I/O puzzles from CodinGame locally
MIT License
4 stars 2 forks source link

Add timeout to `clash run` #16

Closed Andriamanitra closed 7 months ago

Andriamanitra commented 8 months ago

If the solution takes more than 5 seconds for a test case it should be timed out. The timeout should (eventually) be configurable with --timeout option.

While messing with time consider also adding measurement of how long the solutions take in general and print it as "X/Y tests passed (took Z seconds)" to give some rudimentary idea of solution performance.

This crate might be useful: https://docs.rs/wait-timeout/latest/wait_timeout/