bparli / fastping-rs

ICMP ping library in Rust inspired by go-fastping and AnyEvent::FastPing Perl module
MIT License
76 stars 12 forks source link

CPU burn #5

Closed robbieh closed 5 years ago

robbieh commented 5 years ago

Thanks for writing this. I used it in a project, but it seems to always consume 100% cpu. Is there some way to throttle the ping rate so that doesn't happen?

The project I used it in is here: https://github.com/robbieh/dasblinkenping

bparli commented 5 years ago

Thanks for raising this. The max_rtt argument determines the ping rate, but it looks like you already have that set past the default to 10 seconds. I think I see whats causing the excessive CPU time so let me try a fix

bparli commented 5 years ago

This should be resolved with #6

robbieh commented 5 years ago

Oh, that's aces! It hardly registers any CPU time at all now. Thank you so much!