diff options
author | Henning Baldersheim <balder@yahoo-inc.com> | 2023-03-05 18:45:10 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-03-05 18:45:10 +0100 |
commit | ae5b04b30906e542747439dcab2fbae4fa5fbc4a (patch) | |
tree | a22aa7413de0560de68d73640a9979894595b2c8 | |
parent | 39fb117d95042d49445168e5474102fb2498955a (diff) | |
parent | 39705d05178c83dfd5c43a1cd1f5494bd817af11 (diff) |
Merge pull request #26301 from vespa-engine/toregge/use-duration-cast-when-converting-to-system-time
Use std::chrono::duration_cast when converting to system time.
-rw-r--r-- | vespalib/src/vespa/fastos/unix_file.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/vespalib/src/vespa/fastos/unix_file.cpp b/vespalib/src/vespa/fastos/unix_file.cpp index af4dc98820e..802e85d7609 100644 --- a/vespalib/src/vespa/fastos/unix_file.cpp +++ b/vespalib/src/vespa/fastos/unix_file.cpp @@ -103,7 +103,7 @@ FastOS_UNIX_File::Stat(const char *filename, FastOS_StatInfo *statInfo) #elif defined(__APPLE__) modTimeNS += stbuf.st_mtimespec.tv_nsec; #endif - statInfo->_modifiedTime = vespalib::system_time(std::chrono::nanoseconds(modTimeNS)); + statInfo->_modifiedTime = vespalib::system_time(std::chrono::duration_cast<vespalib::system_time::duration>(std::chrono::nanoseconds(modTimeNS))); rc = true; } else { if (errno == ENOENT) { |