Results for “time”
Small, practical examples. Search by task or narrow things down below.
Repeat a fixed number of times
C: Use a counted loop to print three numbered steps.
C✓ Tested
Repeat a serial message three times
Arduino / C: Repeat a serial message three times on an Uno with the Serial Monitor set to 9600 baud.
Arduino / C✓ Tested
Repeat a string a fixed number of times
JavaScript: String.repeat requires a nonnegative finite repetition count.
JavaScript✓ Tested
Repeat a string a fixed number of times
TypeScript: String.repeat requires a nonnegative finite repetition count.
TypeScript✓ Tested
Repeat an action a fixed number of times
Use a counter and delay for a simple finite sequence.
for loop✓ Tested
Repeat text a fixed number of times
Java: Use String.repeat with a nonnegative repetition count.
Java✓ Tested
Round a timestamp down to its month
Group dates by a calendar boundary.
date_trunc✓ Tested
Schedule a one-time update with cleanup
Schedule a one-time update with cleanup with a small React component and explicit browser behavior.
React✓ Tested
Select a time in quarter-hour increments
HTML: A time step is expressed in seconds, so 900 represents fifteen minutes.
HTML✓ Tested
Sort timestamp strings by their parsed instants
JavaScript: Compare epoch values explicitly when date strings may contain different offsets.
JavaScript✓ Tested
Sort timestamp strings by their parsed instants
TypeScript: Compare epoch values explicitly when date strings may contain different offsets.
TypeScript✓ Tested
Store and cancel a timer handle
Store and cancel a timer handle with a small React component and explicit browser behavior.
React✓ Tested