Sign in to follow this  
ixjackinthebox

Lua timing

Recommended Posts

In lua how can I get the time between two points
so if I press the enter key
and then press the enter key again a bit later
it would tell me the time passed in between the two points

How can I do that?

Share this post


Link to post
Share on other sites
You can use the function [b]os.time()[/b] to get the time since epoch, or [b]os.date()[/b] to get current the date and time, or [b]os.clock()[/b] to get the time since program start. Barring those, you could bind to an external time tracking library.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this