Page 1 of 1

globalstep or minetest.after?

PostPosted: Mon May 16, 2016 06:43
by burli
If you want to call a function every few seconds and you don't need high accuracy, wouldn't it be better to use minetest.after instead of globalstep? What is more efficient?

Re: globalstep or minetest.after?

PostPosted: Mon May 16, 2016 08:18
by Krock
minetest.after() is not a core function and is based on register_globalstep too.
Lua is fast, thus, you won't notice any speed increase when you use globalstep instead of minetest.after

https://github.com/minetest/minetest/bl ... sc.lua#L40