As a result, in Lua on Windows, the function os.clock() returns wall-clock time.
I've tested it on Lua built with both compilers (Visual Studio and MinGW-w64).
It looks like it's Microsoft's fault to incorrectly implement C run-time function. But Lua should workaround this bug. Or the Lua manual should be corrected.