When printing a profiler it should print just the time, without any words.
Current state
Why?
Formating custom messages with the profiler is ugly due to the enforced word content. Especially when the user has set their locale to a language that the profiler-providing mod is not localized for. English and Japanese examples:
Desired behavior
The compiler should print as an undecorated number.
Note that for example Japanese uses the localized unit name "ミリ秒" for "ms" and also does not include any whitespace.
Code: Select all
/c game.print{"my-mod.my-profiler-message",game.create_profiler()}
-- English locale.
The function took 0.123456ms to run!
-- Japanese locale.
関数呼び出しには0.12456ミリ秒がかかりました!