[gnote] Update notedirecotrywatcher with regard to TimeSpan



commit 694bfafa97f59a3aafd4e88cae4d6892f581de67
Author: Aurimas Černius <aurisc4 gmail com>
Date:   Mon Jan 13 17:48:35 2020 +0200

    Update notedirecotrywatcher with regard to TimeSpan

 .../notedirectorywatcher/notedirectorywatcherapplicationaddin.cpp     | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/src/addins/notedirectorywatcher/notedirectorywatcherapplicationaddin.cpp 
b/src/addins/notedirectorywatcher/notedirectorywatcherapplicationaddin.cpp
index fcb471e9..a415af48 100644
--- a/src/addins/notedirectorywatcher/notedirectorywatcherapplicationaddin.cpp
+++ b/src/addins/notedirectorywatcher/notedirectorywatcherapplicationaddin.cpp
@@ -1,7 +1,7 @@
 /*
  * gnote
  *
- * Copyright (C) 2012-2014,2017,2019 Aurimas Cernius
+ * Copyright (C) 2012-2014,2017,2020 Aurimas Cernius
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -167,7 +167,7 @@ bool NoteDirectoryWatcherApplicationAddin::handle_timeout()
 
       // Check that Note.Saved event didn't occur within (check-interval -2) seconds of last write
       if(m_note_save_times.find(iter.first) != m_note_save_times.end() &&
-          std::abs((m_note_save_times[iter.first] - iter.second.last_change).total_seconds()) <= 
(m_check_interval - 2)) {
+          std::abs(sharp::time_span_total_seconds(m_note_save_times[iter.first] - iter.second.last_change)) 
<= (m_check_interval - 2)) {
         DBG_OUT("NoteDirectoryWatcher: Ignoring (timeout) because it was probably a Gnote write");
         keysToRemove.push_back(iter.first);
         continue;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]