white = Color.new(255, 255, 255)
while true do
screen:clear()
screen:print(0, 0, "clock: " .. os.clock(), white)
screen.waitVblankStart()
screen.flip()
if Controls.read():start() then break end
end
and every second 1000 is added. os.clock() is implemented like this in the lua lib:
heh, looks like the same problem I have had. I asked this question also like a month ago with no response. Yes, it's 1,000,000 clock ticks per second and CLOCK_PER_SEC should be 1,000,000.
You wont find it in pspsdk because it is a newlib thing, seems Sony's clock function follows the POSIX standard by making clock in 1e6 units, while newlib err doesn't :P
I'll try and get around to adjusting it at some point (note: it shouldn't require a rebuild of newlib if you have it, just change it in /usr/local/pspdev/psp/include/time.h)
TyRaNiD wrote:I'll try and get around to adjusting it at some point (note: it shouldn't require a rebuild of newlib if you have it, just change it in /usr/local/pspdev/psp/include/time.h)