time_t.nim 687 B

1234567891011121314151617181920212223
  1. #
  2. #
  3. # Nim's Runtime Library
  4. # (c) Copyright 2019 Nim contributors
  5. #
  6. # See the file "copying.txt", included in this
  7. # distribution, for details about the copyright.
  8. #
  9. when defined(nimdoc):
  10. type
  11. Impl = distinct int64
  12. Time* = Impl ## \
  13. ## Wrapper for `time_t`. On posix, this is an alias to `posix.Time`.
  14. elif defined(windows):
  15. when defined(i386) and defined(gcc):
  16. type Time* {.importc: "time_t", header: "<time.h>".} = distinct clong
  17. else:
  18. # newest version of Visual C++ defines time_t to be of 64 bits
  19. type Time* {.importc: "time_t", header: "<time.h>".} = distinct int64
  20. elif defined(posix):
  21. import std/posix
  22. export posix.Time