summaryrefslogtreecommitdiff
path: root/crates
diff options
context:
space:
mode:
authorSébastien d'Herbais de Thun <sebastien.d.herbais@gmail.com>2024-11-17 10:05:01 +0100
committerGitHub <noreply@github.com>2024-11-17 09:05:01 +0000
commit5db179d67ab27a9e19477a92bb1ed18fd82c8e76 (patch)
tree16c3effef6eda38fae5713407b9b21b7198275f5 /crates
parentcce744cf780dd730f1638e17a0e106faeb38de22 (diff)
Timings for `state.at` and `state.get` (#5411)
Diffstat (limited to 'crates')
-rw-r--r--crates/typst-library/src/introspection/state.rs2
1 files changed, 2 insertions, 0 deletions
diff --git a/crates/typst-library/src/introspection/state.rs b/crates/typst-library/src/introspection/state.rs
index 13c96b50..62aba5ff 100644
--- a/crates/typst-library/src/introspection/state.rs
+++ b/crates/typst-library/src/introspection/state.rs
@@ -280,6 +280,7 @@ impl State {
/// Retrieves the value of the state at the current location.
///
/// This is equivalent to `{state.at(here())}`.
+ #[typst_macros::time(name = "state.get", span = span)]
#[func(contextual)]
pub fn get(
&self,
@@ -303,6 +304,7 @@ impl State {
/// _Compatibility:_ For compatibility with Typst 0.10 and lower, this
/// function also works without a known context if the `selector` is a
/// location. This behaviour will be removed in a future release.
+ #[typst_macros::time(name = "state.at", span = span)]
#[func(contextual)]
pub fn at(
&self,