backenddebuggingsystem-design
Use a monotonic clock for elapsed time
Anonymous
Wall clocks can jump when time is corrected, so they are a poor basis for measuring a timeout or duration. A monotonic clock only moves forward. Store its reading at the start, then subtract it from the current reading to measure elapsed time. Keep wall-clock timestamps for dates and audit records.
0