The os.clock
function returns the number of seconds of CPU time for the program. So the sleep
function of yours waits for n
seconds, if you need to delay 2 minutes, just call:
sleep(2*60)
Note that there are some better solutions to implement sleep
functions other than busy waiting, see Sleep Function for detail.
Related Posts:
- How do you add a timed delay to a C++ program?
- How to create an accurate timer in javascript?
- How can I make a time delay in Python? [duplicate]
- Logitech/LGHUB Lua – Loop with break
- how to sort pandas dataframe from one column
- JavaScript sleep/wait before continuing [duplicate]
- Exception in thread “main” java.lang.Error: Unresolved compilation problems
- Exception in thread “main” java.lang.Error: Unresolved compilation problems
- Java string to date conversion
- jQuery: Wait/Delay 1 second without executing code
- How to get current time and date in C++?
- How to get current time and date in C++?
- How to get the current time in Python
- Add days to JavaScript Date
- Concatenation of strings in Lua
- Get the current time in C
- Split a string using string.gmatch() in Lua
- Current time formatting with Javascript
- What is the easiest way to get current GMT time in Unix timestamp format?
- Lua replacement for the % operator
- Inline conditions in Lua (a == b ? “yes” : “no”)?
- Lua string.format options
- NOW() function in PHP
- What do ‘real’, ‘user’ and ‘sys’ mean in the output of time(1)?
- How to delete last item in list?
- How to remove a lua table entry by its key?
- Get the current time in C
- Oracle date format picture ends before converting entire input string
- What is a good game engine that uses Lua?
- Add days to JavaScript Date
- How to add a delay for a 2 or 3 seconds
- Proper way to wait for one function to finish before continuing?
- “attempt to index a nil value”-error in Lua
- timestamp of time(0) at multiple places in a C++ program
- How do I get time of a Python program’s execution?
- How do I get the day of week given a date?
- Creating a timer using Lua
- Getting current date and time in JavaScript
- How to add a “sleep” or “wait” to my Lua Script?
- What is the difference of pairs() vs. ipairs() in Lua?
- How to get number of entries in a Lua table?
- How to dump a table to console?
- Lua – if statement with two conditions on the same variable?
- What is time(NULL) in C?
- Lua string to int
- How to get current time in milliseconds?
- Lua read beginning of a string
- Convert a Unix timestamp to time in JavaScript
- How to get current time and date in Android
- How do I measure request and response times at once using cURL?
- Why does Lua have no “continue” statement?
- Order functions by growth rate
- Getting input from the user in Lua
- Does Lua have OR comparisons?
- Lua – Number to string behaviour
- Lua String replace
- How to iterate through table in Lua?
- How to convert date to timestamp?
- How to get time difference in minutes in PHP
- Get current time in milliseconds in Python?
- Lua: Rounding numbers and then truncate
- How to math.floor to a decimal in Lua?
- Lua operators, why isn’t +=, -= and so on defined?
- A non well formed numeric value encountered
- How do I append to a table in Lua
- What’s a Good Javascript Time Picker?
- How to understand strptime vs. strftime
- Lua Semicolon Conventions
- create php live clock
- How do I get the current Unix time in milliseconds in Bash?
- How do I force sync the time on Windows Workstation or Server?