Commit 7f7bcd7
committed
[lua] Implement Sys.getEnv and Timer.stamp for lua-vanilla mode
Sys.getEnv() was throwing NotImplementedException in lua-vanilla mode
despite having a trivial vanilla Lua implementation via os.getenv().
Timer.stamp() now uses os.clock() directly on all Lua targets for
subsecond precision.
Sys.time() is intentionally left as notImplemented() in lua-vanilla
mode: vanilla Lua's os.time() has only second-level precision, which
would silently disagree with the fractional-second wall-clock time
returned by Sys.time() on every other target. Subsecond wall-clock
time requires luv (non-vanilla mode).
Addresses #12843 (hxcoro with -D lua-vanilla).1 parent ab70430 commit 7f7bcd7
2 files changed
Lines changed: 3 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
173 | 173 | | |
174 | 174 | | |
175 | 175 | | |
| 176 | + | |
| 177 | + | |
176 | 178 | | |
177 | 179 | | |
178 | 180 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
46 | 46 | | |
47 | 47 | | |
48 | 48 | | |
49 | | - | |
| 49 | + | |
50 | 50 | | |
51 | 51 | | |
52 | 52 | | |
| |||
0 commit comments