event/Loop: use std::chrono

This commit is contained in:
Max Kellermann
2016-12-27 23:06:34 +01:00
parent 3413d1bf23
commit b042095ac2
22 changed files with 92 additions and 78 deletions

View File

@@ -33,7 +33,8 @@ extern "C" {
#include <poll.h> /* for POLLIN, POLLOUT */
static constexpr unsigned NFS_MOUNT_TIMEOUT = 60;
static constexpr std::chrono::steady_clock::duration NFS_MOUNT_TIMEOUT =
std::chrono::minutes(1);
inline void
NfsConnection::CancellableCallback::Stat(nfs_context *ctx,
@@ -541,7 +542,7 @@ NfsConnection::MountInternal()
postponed_mount_error = std::exception_ptr();
mount_finished = false;
TimeoutMonitor::ScheduleSeconds(NFS_MOUNT_TIMEOUT);
TimeoutMonitor::Schedule(NFS_MOUNT_TIMEOUT);
#ifndef NDEBUG
in_service = false;