Tune announcer performance

This commit is contained in:
Natsu Kagami 2020-02-11 19:44:10 -05:00
parent 063c8baaa9
commit 5d6e537ac2
Signed by: nki
GPG key ID: 73376E117CD20735
7 changed files with 15 additions and 3 deletions

View file

@ -39,6 +39,8 @@ fn update_user(
user_id: UserId,
cfu: &mut CfUser,
) -> CommandResult {
// Ensure this takes 200ms
let after = crossbeam_channel::after(std::time::Duration::from_secs_f32(0.2));
let info = User::info(reqwest, &[cfu.handle.as_str()])?
.into_iter()
.next()
@ -91,6 +93,7 @@ fn update_user(
}
}
}
after.recv().ok();
Ok(())
}