FIND YOUR NEXT FEW LINES

Results for “time”

Small, practical examples. Search by task or narrow things down below.

236 snippets foundClear filters
CGetting Started

Repeat a fixed number of times

C: Use a counted loop to print three numbered steps.

C✓ Tested
Arduino / CGetting Started

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
JavaScriptText handling & Unicode

Repeat a string a fixed number of times

JavaScript: String.repeat requires a nonnegative finite repetition count.

JavaScript✓ Tested
TypeScriptText handling & Unicode

Repeat a string a fixed number of times

TypeScript: String.repeat requires a nonnegative finite repetition count.

TypeScript✓ Tested
Arduino / CTiming & control

Repeat an action a fixed number of times

Use a counter and delay for a simple finite sequence.

for loop✓ Tested
JavaText validation & formatting

Repeat text a fixed number of times

Java: Use String.repeat with a nonnegative repetition count.

Java✓ Tested
PostgresDates & series

Round a timestamp down to its month

Group dates by a calendar boundary.

date_trunc✓ Tested
ReactEffects & lifecycle

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
HTMLInput constraints

Select a time in quarter-hour increments

HTML: A time step is expressed in seconds, so 900 represents fifteen minutes.

HTML✓ Tested
JavaScriptUTC date operations

Sort timestamp strings by their parsed instants

JavaScript: Compare epoch values explicitly when date strings may contain different offsets.

JavaScript✓ Tested
TypeScriptUTC date operations

Sort timestamp strings by their parsed instants

TypeScript: Compare epoch values explicitly when date strings may contain different offsets.

TypeScript✓ Tested
ReactRefs & DOM interaction

Store and cancel a timer handle

Store and cancel a timer handle with a small React component and explicit browser behavior.

React✓ Tested