diff options
Diffstat (limited to 'logd')
-rw-r--r-- | logd/src/logd/watcher.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/logd/src/logd/watcher.cpp b/logd/src/logd/watcher.cpp index 103432e0136..1ef9288f4da 100644 --- a/logd/src/logd/watcher.cpp +++ b/logd/src/logd/watcher.cpp @@ -236,7 +236,7 @@ Watcher::watchfile() already.st_dev = sb.st_dev; already.st_ino = sb.st_ino; - time_t now = time(nullptr); + time_t now = fastos::time(); bool wantrotate = (now > created + _confsubscriber.getRotateAge()) || (sb.st_size > _confsubscriber.getRotateSize()); @@ -351,10 +351,10 @@ Watcher::removeOldLogs(const char *prefix) } if (S_ISREG(sb.st_mode)) { if (sb.st_mtime + - _confsubscriber.getRemoveAge() * 86400 < time(nullptr)) + _confsubscriber.getRemoveAge() * 86400 < fastos::time()) { LOG(info, "removing %s, too old (%f days)", fname, - (double)(time(nullptr)-sb.st_mtime)/86400.0); + (double)(fastos::time()-sb.st_mtime)/86400.0); if (unlink(fname) != 0) { LOG(warning, "cannot remove %s: %s", |