diff options
author | Oscar NihlgÄrd <oscarnihlgard@gmail.com> | 2018-04-13 07:36:31 +0200 |
---|---|---|
committer | Andreas Rumpf <rumpf_a@web.de> | 2018-04-13 07:36:30 +0200 |
commit | f6df2d9956a79eda048639107274ce60cbcf3542 (patch) | |
tree | ce567080709419e0f04448335eba9ff24b1b3c15 /compiler | |
parent | 19a1cc914fb8a744243a9730f120f6e932134106 (diff) | |
download | Nim-f6df2d9956a79eda048639107274ce60cbcf3542.tar.gz |
Sub second time resolution (#6978)
* Add deprecation warnings to recently deprecated procs * Fix bad usage of the times module * Introduce sub second resolution * Fix usage of C's time() * Switch to nanosecond resolution * Make Time & Duration opaque again and fix some errors * Change back to TimeInterval for shorthands * Fix JS test * Fix build error for windows * Undeprecate epochTime * Documentation and minor changes * Lots of bugfixes and doc comments * Attempt to make travis & appveyor green * Fix edge cases for dealing with the local timezone * Workaround JS backend overflow/underflow bug * Use better workaround for not knowing the size of time_t * Use all available timezones for tests * Fix indentation * Add procs for accessing the fractional part of a duration * Order time units from smallest to largest since it makes more sense * Include months and years in `TimeUnit` * Review fix
Diffstat (limited to 'compiler')
-rw-r--r-- | compiler/scriptconfig.nim | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/compiler/scriptconfig.nim b/compiler/scriptconfig.nim index 7cf148b76..692a8d896 100644 --- a/compiler/scriptconfig.nim +++ b/compiler/scriptconfig.nim @@ -77,8 +77,7 @@ proc setupVM*(module: PSym; cache: IdentCache; scriptName: string; cbos copyDir: os.copyDir(getString(a, 0), getString(a, 1)) cbos getLastModificationTime: - # depends on Time's implementation! - setResult(a, int64(getLastModificationTime(getString(a, 0)))) + setResult(a, getLastModificationTime(getString(a, 0)).toUnix) cbos findExe: setResult(a, os.findExe(getString(a, 0))) |