summary refs log tree commit diff stats
path: root/lib/posix/posix_other.nim
diff options
context:
space:
mode:
authorOscar NihlgÄrd <oscarnihlgard@gmail.com>2018-06-04 14:56:56 +0200
committerAndreas Rumpf <rumpf_a@web.de>2018-06-04 14:56:56 +0200
commit05b447374bb6c8d2d09cee46e4f1fd68f5a8067f (patch)
tree8e15bbcf2035d74c5c625c66f29898146fc775de /lib/posix/posix_other.nim
parent440212a154ba26a633fa1360ed1f7bb29b274026 (diff)
downloadNim-05b447374bb6c8d2d09cee46e4f1fd68f5a8067f.tar.gz
Use higher time resolution when available in os.nim (#7709)
Diffstat (limited to 'lib/posix/posix_other.nim')
-rw-r--r--lib/posix/posix_other.nim10
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/posix/posix_other.nim b/lib/posix/posix_other.nim
index 004a4205b..b7570bd15 100644
--- a/lib/posix/posix_other.nim
+++ b/lib/posix/posix_other.nim
@@ -215,14 +215,14 @@ type
                           ## For a typed memory object, the length in bytes.
                           ## For other file types, the use of this field is
                           ## unspecified.
-    when defined(macosx) or defined(android):
-      st_atime*: Time     ## Time of last access.
-      st_mtime*: Time     ## Time of last data modification.
-      st_ctime*: Time     ## Time of last status change.
-    else:
+    when StatHasNanoseconds:
       st_atim*: Timespec  ## Time of last access.
       st_mtim*: Timespec  ## Time of last data modification.
       st_ctim*: Timespec  ## Time of last status change.
+    else:
+      st_atime*: Time     ## Time of last access.
+      st_mtime*: Time     ## Time of last data modification.
+      st_ctime*: Time     ## Time of last status change.
     st_blksize*: Blksize  ## A file system-specific preferred I/O block size
                           ## for this object. In some file system types, this
                           ## may vary from file to file.