pub fn difftime(t2: number, t1: number) -> numberExpand description
Returns the difference between two times.
§Parameters
t2: the later time, as returned bytime.t1: the earlier time.
§Return value
The difference, in seconds, from time t1 to time t2, as a float.
On POSIX, Windows and most other systems this is exactly t2 - t1.
§Examples
local before = os.time()
-- ... some slow work ...
print(os.difftime(os.time(), before)) --> 2.0