A timer toolkit that is generic over the underlying timer implementation.

Overview

timer-kit

A timer toolkit that is generic over the underlying timer implementation.

crate_version docs_version

This crate does not implement any platform-specific timer but uses a generic abstraction over the timer implementation to provide a set of timer related tools:

  1. [sleep()]/[Sleep]
  2. [timeout()]/[Timeout]
  3. [interval()]/[Interval]
  4. [DelayQueue]

This crate currently does not provide any feature beyond the ones that is already provided by tokio, so this crate is completely not needed if you are already using tokio in your project.

The core of this crate is the [Delay] trait, and it is implemented for the following types by enabling the corresponding features:

Type Feature Target Arch
[tokio::time::Sleep] "tokio" non-wasm32
[smol::Timer] "smol" non-wasm32
[futures_timer::Delay] "futures-timer" non-wasm32
[wasm_timer::Delay] "wasm-timer" wasm32
[fluvio_wasm_timer::Delay] "fluvio-wasm-timer" wasm32

WebAssembly support

Support for wasm32-unknown-unknown target depends on the chosen timer implementation. wasm-timer and fluvio-wasm-timer are the only two wasm timer implementations that are currently supported.

Examples

The usage remains mostly similar to those provided in tokio::time with one additional generic type parameter D which is the type of the underlying timer implementation. Please refer to the documentation of the corresponding types for more details.

License: MIT/Apache-2.0

You might also like...
Network Block Storage server, written in Rust. Supports pluggable and chainable underlying storage

nbd-rs Disclaimer DO NEVER USE THIS FOR PRODUCTION Do not use this for any data that you cannot afford to lose any moment. Expect data loss, corruptio

An iterator adapter to peek at future elements without advancing the cursor of the underlying iterator.

multipeek An iterator adapter to peek at future elements without advancing the cursor of the underlying iterator. Check out the documentation for more

notiflux - subscribe over WebSockets, publish over REST

notiflux notiflux is a pub/sub server where clients subscribe over a WebSocket and messages are broadcast over a POST request How does it work? Client

RTIC monotonic implementation using the RP2040's Timer peripheral

rp2040-monotonic RTIC monotonic implementation using the RP2040's Timer peripheral. Documentation License Licensed under either of Apache License, Ver

A Rust implementation of generic prefix tree (trie) map with wildcard capture support

prefix_tree_map A Rust implementation of generic prefix tree (trie) map with wildcard capture support. Design Trie is a good data structure for storin

StdFuzzer - StdFuzzer is the reference implementation of a generic bit-level fuzzer with LibAFL

StdFuzzer StdFuzzer is the reference implementation of a generic bit-level fuzzer with LibAFL Building Build with $ cargo build --release Compiling a

Generic k-means implementation written in Rust

RKM - Rust k-means A simple Rust implementation of the k-means clustering algorithm based on a C++ implementation, dkm. This implementation is generic

Generic framebuffer implementation in Rust for use with embedded-graphics library

Fraramebuffer implementation for Rust's Embedded-graphics Framebuffer approach helps to deal with display flickering when you update multiple parts of

A lightweight Rust library for BitVector Rank&Select operations, coupled with a generic Sparse Array implementation

A lightweight Rust library for BitVector Rank&Select operations, coupled with a generic Sparse Array implementation

Implementation of generic IBC queries in CosmWasm.

CosmWasm IBC Queries Implements generic IBC queries in CosmWasm. This implementation requires the same contract to be deployed on both chains wishing

a hack implementation of CCS generic arithmetization, won a prize at Zuzalu hackathon 2023 despite incompleteness
a hack implementation of CCS generic arithmetization, won a prize at Zuzalu hackathon 2023 despite incompleteness

ccs-hack CCS (Customized Constraint System) is a generic constraints representation system can simultaneously capture R1CS, Plonkish, and AIR: $$\sum_

Simple timer for your terminal

consoleTimer Simple timer that allows you to initiate countdown from N seconds. Usage: consoletimer [time in seconds] consoletimer [time in minutes]m

Simple profiler scopes for wgpu using timer queries

wgpu-profiler Simple profiler scopes for wgpu using timer queries Features Easy to use profiler scopes Allows nesting! Can be disabled by runtime flag

A simple CLI pomodoro timer written in Rust.

Pomodoro A simple CLI pomodoro timer written in Rust. Based on the Pomodoro Technique. Works on any platform that supports desktop notifications. Exam

Simple pomodoro timer with notifications
Simple pomodoro timer with notifications

omo Simple pomodoro timer with notifications Installation

A timer based on a multi-time wheel structure

wheel-timer2 A timer based on a multi-time wheel structure This library uses a multi-layered time wheel structure. When a task is added to the wheel,

TimeKnight is a neat little TUI-based timer app I use in conjunction with a task tracker
TimeKnight is a neat little TUI-based timer app I use in conjunction with a task tracker

TimeKnight is a neat little TUI-based timer app I use in conjunction with a task tracker. It's kind of a secret sauce for productivity (particularly if you have ADHD or have a ridiculously overactive brain).

Speedrun timer with autosplitter for fxpak/sd2snes
Speedrun timer with autosplitter for fxpak/sd2snes

About This is a simple barebones re-imagining of LiveSplit + autosplitter for SNES (sd2snes/fxpak + qusb2snes or SNI). It's named for the phylum of se

A clock app in terminal written in Rust, supports local clock, timer and stopwatch.
A clock app in terminal written in Rust, supports local clock, timer and stopwatch.

clock-tui (tclock) A clock app in terminal. It support the following modes: Clock Timer Stopwatch Countdown Usage Install Install excutable by cargo:

Owner
null
Benchmark over Node.js binding frameworks in Rust

Benchmark over Node.js binding frameworks in Rust

LongYinan 7 Dec 28, 2022
WebAssembly implementation from scratch in Safe Rust with zero dependencies

wain wain is a WebAssembly INterpreter written in Rust from scratch with zero dependencies. An implementation of WebAssembly. Features: No unsafe code

Linda_pp 328 Jan 2, 2023
Pure Rust Lua implementation

purua Pure Rust Lua implementation Usage $ bat lua_examples/defun.lua ───────┬────────────────────────────────────────── │ File: lua_examples/d

Kondo Uchio 35 Dec 28, 2021
Implementation of Monte Carlo PI approximation algorithm in Rust Python bindings

rusty_pi Implementation of Monte Carlo PI approximation algorithm in Rust Python bindings. Time of 100M iterations approximation on Core i7 10th gen:

Aleksey Popov 1 Jul 6, 2022
Implementation of the Radon and Inverse Radon Transforms in Rust

Radon Transform A rust and python implementation of the discretized version of the radon transform that I did out of boredom. The main mathematical tr

Atman Kar 0 Nov 8, 2021
Implementation of malloc, realloc, calloc, and free in Rust.

malloc-rs Implementation of malloc, realloc, calloc, and free in Rust. Note: No thread safe Architecture 512 bytes or less is allocated by Segregated

suzu 7 Nov 23, 2022
Rust implementation of the Mina protocol, targeting Wasm and ARM architectures.

Mina-rs An implementation of Mina protocol in Rust, with focus on web and Wasm compatibility ** As you can probably tell this is a WIP! Don't use for

ChainSafe 157 Dec 12, 2022
Arrowdantic is a small Python library backed by a mature Rust implementation of Apache Arrow

Welcome to arrowdantic Arrowdantic is a small Python library backed by a mature Rust implementation of Apache Arrow that can interoperate with Parquet

Jorge Leitao 52 Dec 21, 2022
A faster experimental wasm-based tar implementation for browsers.

@bytedance/tar-wasm A faster* experimental wasm-based tar implementation for browsers. *50-160x faster, see benchmarks below. Usage Install npm instal

Bytedance Inc. 65 Dec 16, 2022
The underlying cryptographic primitives for Manta Ecosystem

manta crypto The underlying cryptography that manta ecosystem relies on. It comes with the following traits: checksum: definitions for message digest.

Manta Network 10 Nov 10, 2021