MCPcopy Create free account
hub / github.com/clockworklabs/SpacetimeDB / nonrepeating_test

Function nonrepeating_test

modules/module-test/src/lib.rs:257–267  ·  view source on GitHub ↗
(ctx: &ReducerContext, arg: NonrepeatingTestArg)

Source from the content-addressed store, hash-verified

255
256#[spacetimedb::reducer]
257pub fn nonrepeating_test(ctx: &ReducerContext, arg: NonrepeatingTestArg) {
258 let delta_time = ctx
259 .timestamp
260 .duration_since(arg.prev_time)
261 .expect("arg.prev_time is later than ctx.timestamp... huh?");
262 log::trace!(
263 "This reducers runs only once, at Timestamp: {:?}, Delta time: {:?}",
264 ctx.timestamp,
265 delta_time
266 );
267}
268
269#[spacetimedb::reducer]
270pub fn add(ctx: &ReducerContext, name: String, age: u8) {

Callers

nothing calls this directly

Calls 1

duration_sinceMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…