aboutsummaryrefslogtreecommitdiff
path: root/libbutl/filesystem.cxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2018-11-26 10:22:42 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2018-11-26 10:22:42 +0200
commitb55143ecaa986aa3ba93dc6a078ed7d9cf495b1c (patch)
tree6936c4082760fc73549dd5a569ce9eb59fc4aa39 /libbutl/filesystem.cxx
parent210d9cacde638449af430fad0bf245c04c123ebf (diff)
Add note on "filesystem time" on Windows
Diffstat (limited to 'libbutl/filesystem.cxx')
-rw-r--r--libbutl/filesystem.cxx9
1 files changed, 8 insertions, 1 deletions
diff --git a/libbutl/filesystem.cxx b/libbutl/filesystem.cxx
index 0729964..e87669d 100644
--- a/libbutl/filesystem.cxx
+++ b/libbutl/filesystem.cxx
@@ -196,8 +196,15 @@ namespace butl
{
if (file_exists (p))
{
+ // Note that on Windows there are two times: the precise time (which is
+ // what we get with system_clock::now()) and what we will call the
+ // "filesystem time", which can lag the precise time by as much as a
+ // couple of milliseconds. To get the filesystem time use
+ // GetSystemTimeAsFileTime(). This is just a heads-up in case we decide
+ // to change this code at some point.
+ //
#ifndef _WIN32
- if (utime (p.string ().c_str (), nullptr) == -1)
+ if (utime (p.string ().c_str (), nullptr) == -1)
#else
if (_utime (p.string ().c_str (), nullptr) == -1)
#endif