Results for “duration”
Small, practical examples. Search by task or narrow things down below.
Format whole seconds as hours minutes and seconds
TypeScript: Use integer divisions and remainders for a nonnegative duration.
TypeScript✓ Tested
Reject a narrowing integer conversion
Reject a narrowing integer conversion in a complete Rust program using the standard library.
Rust✓ Tested
Round and format a decimal value
Round and format a decimal value in a complete Rust program using the standard library.
Rust✓ Tested
Saturate arithmetic at the type boundary
Saturate arithmetic at the type boundary in a complete Rust program using the standard library.
Rust✓ Tested
Use a nonnegative remainder for cyclic indexing
Use a nonnegative remainder for cyclic indexing in a complete Rust program using the standard library.
Rust✓ Tested
Blink the built-in LED three times
Alternate the built-in LED with a short blocking delay.
blink✓ Tested
Change an LED delay with a variable
Arduino / C: Assign a new value to a variable to change the next LED pulse duration.
Arduino / C✓ Tested
Check whether a future is ready without blocking
C++: A zero-duration wait reports timeout until the producer sets a value.
C++✓ Tested