{"id":15067637,"url":"https://github.com/whizsid/wasmtimer-rs","last_synced_at":"2025-04-05T13:08:57.627Z","repository":{"id":65912781,"uuid":"586421097","full_name":"whizsid/wasmtimer-rs","owner":"whizsid","description":"std::time, tokio::time, tokio_util::time Replacement for WASM targets.","archived":false,"fork":false,"pushed_at":"2024-11-17T12:47:18.000Z","size":111,"stargazers_count":19,"open_issues_count":4,"forks_count":5,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-29T12:09:37.875Z","etag":null,"topics":["async-await","browser","hacktoberfest","rust","timer","tokio","wasm","webassembly"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/whizsid.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-01-08T04:09:38.000Z","updated_at":"2025-02-28T16:47:21.000Z","dependencies_parsed_at":"2024-12-16T14:43:21.186Z","dependency_job_id":"3aaa1282-3283-4fb4-89b2-0b4bfe5de2d4","html_url":"https://github.com/whizsid/wasmtimer-rs","commit_stats":{"total_commits":40,"total_committers":4,"mean_commits":10.0,"dds":"0.30000000000000004","last_synced_commit":"fc507844b02d7f8abac107e3a46f404d75753e8e"},"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/whizsid%2Fwasmtimer-rs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/whizsid%2Fwasmtimer-rs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/whizsid%2Fwasmtimer-rs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/whizsid%2Fwasmtimer-rs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/whizsid","download_url":"https://codeload.github.com/whizsid/wasmtimer-rs/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247339158,"owners_count":20923014,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["async-await","browser","hacktoberfest","rust","timer","tokio","wasm","webassembly"],"created_at":"2024-09-25T01:25:28.187Z","updated_at":"2025-04-05T13:08:57.608Z","avatar_url":"https://github.com/whizsid.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# wasmtimer-rs\n\nAn implementation of `time` based functionalities from `std::time`, `tokio::time`,\n`tokio_util::time` for WASM targets. This crate tries to closely\nreplicate above APIs. Users only have to change their `use` scripts by\nusing a `cfg` macro.\n\n```rust\n#[cfg(not(target_family=\"wasm\"))]\nuse tokio::time::*;\n#[cfg(target_family=\"wasm\")]\nuse wasmtimer::tokio::*;\n```\n\nCheck the [API Documentation](https://docs.rs/wasmtimer) for more\ndetails.\n\n## Story\n\nCore idea and core modules in `src/timer` folder were copied from\n[this](https://github.com/tomaka/wasm-timer) crate. This crate is\nabandoned now due to lack of maintainability. I've hard forked it,\nadded some additional features and released to use for\n[this](https://github.com/google/tarpc/pull/388) PR.\n\n## `tokio::time` vs `wasmtimer`\n\n- `wasmtimer` is only running on WASM browser targets and not using any\n`tokio` feature as a dependency.\n- This timer crate not supporting\n[Auto-advance](https://docs.rs/tokio/latest/tokio/time/fn.pause.html#auto-advance)\nlike in the tokio crate. Because we can not track the background\ntasks(`Promise`) in browser scope. If we implemented such without caring\nabout background tasks, then this implementation will not match with the\ntokio's original implementation.\n\n## Features\n\n- Serde Support (`serde` feature flag)\n- Worker and NodeJS Support\n- Test Utilities\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwhizsid%2Fwasmtimer-rs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwhizsid%2Fwasmtimer-rs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwhizsid%2Fwasmtimer-rs/lists"}