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

Function SPACETIMEDB_PROCEDURE

modules/module-test-cpp/src/lib.cpp:672–679  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

670
671
672SPACETIMEDB_PROCEDURE(Unit, sleep_one_second, ProcedureContext ctx) {
673 Timestamp prev = ctx.timestamp;
674 auto delta = TimeDuration::from_seconds(1);
675 Timestamp next = prev + delta; // assumes operator+ is available
676 LOG_INFO("Slept from " + prev.to_string() + " to " + next.to_string() +
677 ", a total of " + delta.to_string());
678 return Unit{};
679}
680
681// Return a Baz struct with the foo parameter as a string
682SPACETIMEDB_PROCEDURE(Baz, return_value, ProcedureContext ctx, uint64_t foo) {

Callers

nothing calls this directly

Calls 9

to_string_utf8_lossyMethod · 0.80
to_stringFunction · 0.50
to_stringMethod · 0.45
with_txMethod · 0.45
database_identityMethod · 0.45
getMethod · 0.45
is_okMethod · 0.45
valueMethod · 0.45
errorMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…