-
-
Notifications
You must be signed in to change notification settings - Fork 150
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Grabbing current system time from lua? #42
Comments
You can use standard lua stuff: http://www.lua.org/pil/22.1.html |
I read those but I was concerned (and quite probably an invalid concern) about the precision of the time that the lua calls would be returning. Right now my goal is to grab the current system time so I can use it to adjust a shaders alpha blending using it. I'll give it a shot using the lua date / time stuff and see if I can't get it working. If I end up needing a more precise system time I'll reopen this. |
Essentially what I'm looking to get is - clock()/CLOCKS_PER_SEC |
os.clock is what I was looking for :
http://www.lua.org/pil/22.1.html - just for future reference / in case I forget in the future |
So I don't think there's a lua binding to grab the current system time (please correct me if I'm mistaken), right now I think there is only the binding for grabbing the last frame's delta time - but I think this would be a nice to have.
I can add the binding if you think the enhancement is worth the effort. It would give me more insight into how the whole lua interop works.
Thanks,
The text was updated successfully, but these errors were encountered: