Set A Debounce Value For watchexec Projects

This one took me a while to figure out because I was doing the math wrong. Debouncing changes is done in the watchexec RuntimeConfig with:

Code
runtime.action_throttle(Duration::new(0, 100000000));

That value of _100000000__ is in nano seconds whichs translates to 0.1 second.

Notes
  • That line probably isn't super useful by itself. I've got a more fleshed out example on this page that should help

  • The `0`` in the first part of `Duration::new()`rust` is for seconds if you're looking for longer time frames without so many zeros

Reference

Watchexec "Run a command when files in the current directory change."