summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorChris Wilson <chris+github@qwirx.com>2006-11-13 16:13:20 +0000
committerChris Wilson <chris+github@qwirx.com>2006-11-13 16:13:20 +0000
commitcc104c3057f6e282a09be6b15f8aa5e931a37363 (patch)
tree3f9eb6595166c9b8a216ee8f283828864a5abc9d /bin
parent9bd08c8e9889b3f879723b341e2a9083c356b94f (diff)
Initialise cross-platform timers on all platforms, remove win32-specific
code (refs #9)
Diffstat (limited to 'bin')
-rw-r--r--bin/bbackupd/BackupDaemon.cpp15
1 files changed, 9 insertions, 6 deletions
diff --git a/bin/bbackupd/BackupDaemon.cpp b/bin/bbackupd/BackupDaemon.cpp
index 8f993067..56c17ed1 100644
--- a/bin/bbackupd/BackupDaemon.cpp
+++ b/bin/bbackupd/BackupDaemon.cpp
@@ -75,6 +75,7 @@
#include "IOStreamGetLine.h"
#include "Conversion.h"
#include "Archive.h"
+#include "Timer.h"
#include "MemLeakFindOn.h"
@@ -429,21 +430,19 @@ void BackupDaemon::RunHelperThread(void)
// --------------------------------------------------------------------------
void BackupDaemon::Run()
{
+ // initialise global timer mechanism
+ Timers::Init();
+
#ifdef WIN32
- // init our own timer for file diff timeouts
- InitTimer();
-
try
{
Run2();
}
catch(...)
{
- FiniTimer();
+ Timers::Cleanup();
throw;
}
-
- FiniTimer();
#else // ! WIN32
// Ignore SIGPIPE (so that if a command connection is broken, the daemon doesn't terminate)
::signal(SIGPIPE, SIG_IGN);
@@ -487,6 +486,8 @@ void BackupDaemon::Run()
mpCommandSocketInfo = 0;
}
+ Timers::Cleanup();
+
throw;
}
@@ -497,6 +498,8 @@ void BackupDaemon::Run()
mpCommandSocketInfo = 0;
}
#endif
+
+ Timers::Cleanup();
}
// --------------------------------------------------------------------------