aboutsummaryrefslogtreecommitdiff
path: root/build/timestamp
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2015-06-18 14:41:45 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2015-06-18 14:41:45 +0200
commit63e7a4a77cb8ceed7b42561fe3202b0b48d86db6 (patch)
treebde5a79522225f32ec188ba46d0834486c30f00f /build/timestamp
parent28c82c861e38fe05a25e916563e0551ed8fce91e (diff)
Move path and filesystem from build2 to libbutl
Diffstat (limited to 'build/timestamp')
-rw-r--r--build/timestamp54
1 files changed, 0 insertions, 54 deletions
diff --git a/build/timestamp b/build/timestamp
deleted file mode 100644
index 3479a77..0000000
--- a/build/timestamp
+++ /dev/null
@@ -1,54 +0,0 @@
-// file : build/timestamp -*- C++ -*-
-// copyright : Copyright (c) 2014-2015 Code Synthesis Ltd
-// license : MIT; see accompanying LICENSE file
-
-#ifndef BUILD_TIMESTAMP
-#define BUILD_TIMESTAMP
-
-#include <chrono>
-#include <string>
-#include <iosfwd>
-
-#include <build/path>
-
-namespace build
-{
- // On all three main platforms that we target (GNU/Linux, Windows (both
- // VC++ and GCC/MinGW64), and MacOS X) with recent C++ runtimes,
- // system_clock has nanoseconds resolution and counts from the UNIX
- // epoch. The latter is important since struct stat also returns times
- // based on UNIX epoch.
- //
- // The underlying type for nanoseconds duration is signed integer type
- // of at least 64 bits (currently int64_t). Because it is signed, we
- // will overflow in year 2262 but by then the underlying type will
- // most likely have changed to something larger than 64-bit.
- //
- // So to support other platforms that could possibly use a different
- // system_clock resolutions (e.g., microseconds), we actually not going
- // to assume anywhere (except perhaps timestamp.cxx) that we are dealing
- // with nanoseconds or the 64-bit underlying type.
- //
- using std::chrono::system_clock;
-
- using timestamp = system_clock::time_point;
- using duration = system_clock::duration;
-
- const timestamp timestamp_unknown {duration {-1}};
- const timestamp timestamp_nonexistent {duration {0}};
-
- std::ostream&
- operator<< (std::ostream&, const timestamp&);
-
- std::ostream&
- operator<< (std::ostream&, const duration&);
-
- // Returns timestamp_nonexistent if the entry at the specified path
- // does not exist. All other errors are reported by throwing
- // std::system_error.
- //
- timestamp
- path_mtime (const path&);
-};
-
-#endif // BUILD_TIMESTAMP