mirror of
https://github.com/ProgramSnail/Lama.git
synced 2025-12-06 06:48:48 +00:00
Sexpr tags fixed
This commit is contained in:
parent
cbd715339f
commit
ac853957ae
6 changed files with 22 additions and 3 deletions
|
|
@ -12,3 +12,14 @@ public fun timer () {
|
|||
time () - t
|
||||
}
|
||||
}
|
||||
|
||||
-- Formats a given time as a floating-point number
|
||||
public fun toSeconds (t) {
|
||||
local s = sprintf ("%d", t);
|
||||
|
||||
if s.length >= 7
|
||||
then
|
||||
sprintf ("%s.%s", substring (s, 0, s.length - 7 + 1), substring (s, s.length - 7 + 1, 6))
|
||||
else sprintf ("0.%s", s)
|
||||
fi
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue