Update library.md

Fix the subtraction order and make the recommendation more concise.
This commit is contained in:
Arseny Kapoulkine 2021-11-17 06:41:05 -08:00 committed by GitHub
parent 923f4d00f6
commit 38f7b841a8
Signed by: DevComp
GPG key ID: 4AEE18F83AFDEB23

View file

@ -759,9 +759,7 @@ Otherwise, `s` is interpreted as a [date format string](https://www.cplusplus.co
function os.difftime(a: number, b: number): number function os.difftime(a: number, b: number): number
``` ```
Calculates the difference in seconds between `a` and `b`; provided for compatibility. Calculates the difference in seconds between `a` and `b`; provided for compatibility only. Please use `a - b` instead.
It is adviced not to use `os.difftime(a, b)` for new work. Please use `b - a` instead.
``` ```
function os.time(t: table?): number function os.time(t: table?): number