Add to cargo.toml the dependency
[dependencies] set_time_out = "0.1.4"
Easy peasy.
Import the function and used.
use set_time_out::set_time_out;
and invoque
set_time_out(1500);
The time is in milliseconds. Have nice day.