Use higher time resolution when available in os.nim (#7709)

This commit is contained in:
Oscar Nihlgård 2018-06-04 14:56:56 +02:00 • committed by Andreas Rumpf
commit 05b447374b
4 changed files with 55 additions and 19 deletions

View file

@ -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.