The words Under construction in black text on a yellow background with diagonal black stipes surrounding it
I'm in the process of moving my site. It's still a work in progress. Please excuse the mess and broken links.

Set A Debounce Value For watchexec Projects

TODO: Pull subtitle into page object
Code
runtime.action_throttle(Duration::new(0, 100000000));

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

Notes

Debugging Stuff

I'm moving stuff around right now. All this below is helping me figure out where to put stuff

        -- title

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
-- rust
  
runtime.action_throttle(Duration::new(0, 100000000));


-- p

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 <<link|on this page|id:2p7c45vj>> 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


-- ref
-- title: Watchexec
-- url: https://watchexec.github.io/
-- subtitle: "Run a command when files in the current directory change."

-- ref
-- title: What even is 100000000 nano seconds?
-- url: https://www.google.com/search?q=100000000+nano+seconds+to+seconds&oq=100000000+nano+seconds+to+seconds

-- ref
-- title: Rust Struct - core::time::Duration
-- url: https://doc.rust-lang.org/nightly/core/time/struct.Duration.html

-- ref
-- title: Rust - watchexec::config::RuntimeConfig - action_throttle
-- url: https://docs.rs/watchexec/latest/watchexec/config/struct.RuntimeConfig.html#method.action_throttle



-- categories
-- Rust 
-- watchexec

-- metadata
-- date: 2023-07-16 00:51:59
-- id: 2sdizm5g
-- site: aws
-- type: post
-- status: published