diff options
Diffstat (limited to 'src/timestamp.h')
-rw-r--r-- | src/timestamp.h | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/src/timestamp.h b/src/timestamp.h index cee7ba8..6a7ccd0 100644 --- a/src/timestamp.h +++ b/src/timestamp.h @@ -15,10 +15,19 @@ #ifndef NINJA_TIMESTAMP_H_ #define NINJA_TIMESTAMP_H_ +#ifdef _WIN32 +#include "win32port.h" +#else +#ifndef __STDC_FORMAT_MACROS +#define __STDC_FORMAT_MACROS +#endif +#include <inttypes.h> +#endif + // When considering file modification times we only care to compare // them against one another -- we never convert them to an absolute -// real time. On POSIX we use time_t (seconds since epoch) and on -// Windows we use a different value. Both fit in an int. -typedef int TimeStamp; +// real time. On POSIX we use timespec (seconds&nanoseconds since epoch) +// and on Windows we use a different value. Both fit in an int64. +typedef int64_t TimeStamp; #endif // NINJA_TIMESTAMP_H_ |