added a get_ftime() function for Lua side to use