export const MIN_LOADING_MS = 500
export function waitForMinimumLoadingDuration(
startedAt: number,
minimumMs = MIN_LOADING_MS
): Promise<void> {
const remaining = minimumMs - (Date.now() - startedAt)
if (remaining <= 0) {
return Promise.resolve()
}
return new Promise(resolve => {
setTimeout(resolve, remaining)
})
}Moments
Everyday thoughts, discoveries, and passing notes, kept in their unpolished flow.
June 2026
You have reached the end.