- Run a subprocess such as "rg" and terminate early if necessary
- Run a SQLite SQL a query that errors if it takes more than a second
- Same but for other DBs - MySQL, PostgreSQL, Elastic, Mongo etc
- Execute a fragment of JavaScript in something like QuickJS with a time limit
- Brute force some kind of algorithm with a time limit - using a library I did not write myself