Skip to content

Commit

Permalink
doc: add comment to time_remaining function
Browse files Browse the repository at this point in the history
  • Loading branch information
zshipko committed May 22, 2024
1 parent d22bea8 commit 289fa3f
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions runtime/src/current_plugin.rs
Original file line number Diff line number Diff line change
Expand Up @@ -455,6 +455,8 @@ impl CurrentPlugin {
(offs, length)
}

/// Returns the remaining time before a plugin will timeout, or
/// `None` if no timeout is configured in the manifest
pub fn time_remaining(&self) -> Option<std::time::Duration> {
if let Some(x) = &self.manifest.timeout_ms {
let elapsed = &self.start_time.elapsed().as_millis();
Expand Down

0 comments on commit 289fa3f

Please sign in to comment.