Pad milliseconds with zeroes; the number is guaranteed to be in [0, 999]
range so these two checks are enough.
Signed-off-by: Kirill Primak <vyivel@eclair.cafe>
---
rt/+test/run.ha | 2 ++
1 file changed, 2 insertions(+)
diff --git a/rt/+test/run.ha b/rt/+test/run.ha
index 7e0635ea..e4ae62d1 100644
--- a/rt/+test/run.ha+++ b/rt/+test/run.ha
@@ -89,6 +89,8 @@ export fn tests_main() size = {
print(" tests completed in ");
print(ztos(end.0));
print(".");
+ if (end.1 < 10) print("0");+ if (end.1 < 100) print("0"); print(ztos(end.1));
print("s\n");
--
2.38.1
> + if (end.1 < 10) print("0");> + if (end.1 < 100) print("0");
By convention ifs should be written on multiple lines, with curly braces. The
only exception are if/else expressions that produce a value, like C's ternary
operator.