refactor(ratelimit): Return Duration from Ratelimit functions

- `Ratelimit` is rather a low-level Rust tool, so it should only use `Duration` and `SystemTime`.
- Rename `Ratelimit::update_interval()` to `min_send_interval()`, the word "update" only occurs in
  `last_update`, but it's a private field.
This commit is contained in:
iequidoo
2025-03-28 22:55:36 -03:00
parent 741d1beed8
commit 5a81a0da2a
4 changed files with 19 additions and 9 deletions

View File

@@ -66,7 +66,7 @@ impl WebxdcMessageInfo {
self_addr,
is_app_sender,
is_broadcast,
send_update_interval,
send_update_interval_ms,
send_update_max_size,
} = message.get_webxdc_info(context).await?;
@@ -80,7 +80,7 @@ impl WebxdcMessageInfo {
self_addr,
is_app_sender,
is_broadcast,
send_update_interval,
send_update_interval: send_update_interval_ms,
send_update_max_size,
})
}