os.clock() versus os.time() for measuring CPU-bound versus I/O-bound bottlenecks in Lua
When profiling a Lua routine to determine whether latency stems from CPU computation or external I/O, the standard library offers two timing primitives: os.clock() and os.time(). The objective is to select a timer that accurately reflects the observed delay without relying on non-portable extensions. os.clock() reports processor time consumed by the program,