db/Interface: GetUpdateStamp() returns std::chrono::system_clock::time_point

This commit is contained in:
Max Kellermann
2017-02-11 22:18:28 +01:00
parent 4146475c73
commit 78ca5491e6
6 changed files with 19 additions and 18 deletions

View File

@@ -50,7 +50,7 @@ class SimpleDatabase : public Database {
Directory *root;
time_t mtime;
std::chrono::system_clock::time_point mtime;
/**
* A buffer for GetSong() when prefixing the #LightSong
@@ -88,7 +88,7 @@ public:
* Returns true if there is a valid database file on the disk.
*/
bool FileExists() const {
return mtime > 0;
return mtime >= std::chrono::system_clock::time_point(std::chrono::system_clock::duration::zero());
}
/**
@@ -125,7 +125,7 @@ public:
DatabaseStats GetStats(const DatabaseSelection &selection) const override;
time_t GetUpdateStamp() const override {
std::chrono::system_clock::time_point GetUpdateStamp() const override {
return mtime;
}