Skip to content

docs(examples): add time clock guest - #91

Open
lntutor wants to merge 1 commit into
GianIac:mainfrom
lntutor:feat/time-clock-example
Open

docs(examples): add time clock guest#91
lntutor wants to merge 1 commit into
GianIac:mainfrom
lntutor:feat/time-clock-example

Conversation

@lntutor

@lntutor lntutor commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

Summary

  • add a standalone examples/time_clock guest using nx_sdk::time::now and time::monotonic
  • measure a bounded, side-effect-free CPU loop guarded by black_box and log the elapsed milliseconds
  • document build/run steps, clock semantics, and why a millisecond-resolution result may be 0 ms

Verification

  • /Users/loi/.cargo/bin/cargo fmt --manifest-path examples/time_clock/Cargo.toml --all --check
  • /Users/loi/.cargo/bin/cargo build --manifest-path examples/time_clock/Cargo.toml --release --target wasm32-unknown-unknown
  • /Users/loi/.cargo/bin/cargo clippy --manifest-path examples/time_clock/Cargo.toml --target wasm32-unknown-unknown -- -D warnings
  • target/debug/nx run examples/time_clock/target/wasm32-unknown-unknown/release/time_clock.wasm
  • /Users/loi/.cargo/bin/cargo fmt --all --check
  • /Users/loi/.cargo/bin/cargo test --workspace

Closes #68

@lntutor

lntutor commented Aug 1, 2026

Copy link
Copy Markdown
Contributor Author

Current head 3fc371995b3d512c9aa58b50f4e53adc1b2df82b is mergeable and the visible CI surface on this exact SHA is fully green: cross-platform Check, Clippy, and Test jobs on Ubuntu, macOS, and Windows; Format; Build WASM Examples; CLI Multi-process Smoke; Benchmark Comparator Tests; Ubuntu Profiling Artifacts; Benchmark Regression Gate; and the aggregate CI Success check all completed successfully. There are no review threads or review-body comments open on the current PR state, so if this time-clock guest example still matches the intended direction, it looks ready for maintainer review/merge when convenient.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add a time_clock example using time::now and time::monotonic

1 participant