Closed andrewstarks closed 11 years ago
I hit exactly the same issue yesterday, and latest push checks for existence of posix.clock_gettime
before redefining utils.clock
. However, personally I'm finding the elapsed-time thingy irritating, since the shell provides a perfectly good way to give elapsed wall time (and there's an equivalent command timethis
on Windows). So I'm open to taking out the timer, although maybe utils.clock
and utils.start_timer
still have their issues?
Latest push does not have the problem, but then uses os.clock
which does not give elapsed clock time on Unix.
I did take out utils.start_timer
, but utils.clock
is still there. Without a recent luaposix it will be incorrect of course, but that ain't my problem ;)
Mac OSX does not do posix.clock_gettime()
My solution was to (badly) hack lposix.c to make a fake version, but I suspect that using a Mac equivalent version would be sane-er.
As it stands, I was not able to make lake work with the Mac without the hack, as it complained about calling the nil field value "utils.clock" which was being set to posix.clock_gettime().