Interface definition for the "wasmcloud:timing" capability contract. This contract allows actors to retrieve the current system time on the wasmcloud host.
If the resultant timestamp has nanosecond precision, so if it will be exposed to
users at any point, care should be taken to avoid timing attacks by truncating
the nsec
field or to setting it to 0
.
```rust use wasmcloudinterfacetiming::TimingSender; use wasmbusrpc::actor::prelude::*; use wasmbusrpc::Timestamp;
async fn getcurrenttime(ctx: &Context) -> RpcResult