diff --git a/cib/cib.vcxproj b/cib/cib.vcxproj
index f8a209ee3..4980e5862 100644
--- a/cib/cib.vcxproj
+++ b/cib/cib.vcxproj
@@ -91,7 +91,7 @@
-
+
@@ -106,7 +106,7 @@
-
+
diff --git a/cib/cib.vcxproj.filters b/cib/cib.vcxproj.filters
index 2a3cfd9b5..009045a54 100644
--- a/cib/cib.vcxproj.filters
+++ b/cib/cib.vcxproj.filters
@@ -35,10 +35,10 @@
Headerdateien
-
+
Headerdateien
-
+
Headerdateien
@@ -64,14 +64,14 @@
Quelldateien
-
- Quelldateien
-
Quelldateien
Quelldateien
+
+ Quelldateien
+
\ No newline at end of file
diff --git a/components/cibsync/cibsynccomponent.cpp b/components/cibsync/cibsynccomponent.cpp
index c65053d08..1088ff56b 100644
--- a/components/cibsync/cibsynccomponent.cpp
+++ b/components/cibsync/cibsynccomponent.cpp
@@ -86,7 +86,7 @@ void CIBSyncComponent::ServiceStateChangeRequestHandler(const Endpoint::Ptr& sen
//Service::OnCheckResultReceived(service, params);
//service->ApplyCheckResult(cr);
- time_t now = Utility::GetTime();
+ time_t now = static_cast(Utility::GetTime());
CIB::UpdateTaskStatistics(now, 1);
}
diff --git a/components/compat/compatcomponent.cpp b/components/compat/compatcomponent.cpp
index 3c7be2b1e..c1c51e871 100644
--- a/components/compat/compatcomponent.cpp
+++ b/components/compat/compatcomponent.cpp
@@ -64,13 +64,13 @@ void CompatComponent::DumpHostStatus(ofstream& fp, const Host::Ptr& host)
<< "\t" << "check_latency=0" << "\n"
<< "\t" << "current_state=" << state << "\n"
<< "\t" << "state_type=1" << "\n"
- << "\t" << "last_check=" << time(NULL) << "\n"
- << "\t" << "next_check=" << time(NULL) << "\n"
+ << "\t" << "last_check=" << Utility::GetTime() << "\n"
+ << "\t" << "next_check=" << Utility::GetTime() << "\n"
<< "\t" << "current_attempt=1" << "\n"
<< "\t" << "max_attempts=1" << "\n"
<< "\t" << "active_checks_enabled=1" << "\n"
<< "\t" << "passive_checks_enabled=1" << "\n"
- << "\t" << "last_update=" << time(NULL) << "\n"
+ << "\t" << "last_update=" << Utility::GetTime() << "\n"
<< "\t" << "}" << "\n"
<< "\n";
}
@@ -192,7 +192,7 @@ void CompatComponent::StatusTimerHandler(void)
<< "\n";
statusfp << "info {" << "\n"
- << "\t" << "created=" << time(NULL) << "\n"
+ << "\t" << "created=" << Utility::GetTime() << "\n"
<< "\t" << "version=2.0" << "\n"
<< "\t" << "}" << "\n"
<< "\n";
diff --git a/icinga/endpointmanager.cpp b/icinga/endpointmanager.cpp
index bda7176f0..1e7dc3a4a 100644
--- a/icinga/endpointmanager.cpp
+++ b/icinga/endpointmanager.cpp
@@ -319,7 +319,7 @@ Endpoint::Ptr EndpointManager::GetEndpointByIdentity(const String& identity) con
void EndpointManager::SendAPIMessage(const Endpoint::Ptr& sender, const Endpoint::Ptr& recipient,
RequestMessage& message,
- function callback, time_t timeout)
+ function callback, double timeout)
{
m_NextMessageID++;
@@ -332,7 +332,7 @@ void EndpointManager::SendAPIMessage(const Endpoint::Ptr& sender, const Endpoint
PendingRequest pr;
pr.Request = message;
pr.Callback = callback;
- pr.Timeout = time(NULL) + timeout;
+ pr.Timeout = Utility::GetTime() + timeout;
m_Requests[id] = pr;
diff --git a/icinga/endpointmanager.h b/icinga/endpointmanager.h
index 869a01922..d8dd41f74 100644
--- a/icinga/endpointmanager.h
+++ b/icinga/endpointmanager.h
@@ -57,7 +57,7 @@ public:
void SendMulticastMessage(const Endpoint::Ptr& sender, const RequestMessage& message);
void SendAPIMessage(const Endpoint::Ptr& sender, const Endpoint::Ptr& recipient, RequestMessage& message,
- function callback, time_t timeout = 30);
+ function callback, double timeout = 30);
void ProcessResponseMessage(const Endpoint::Ptr& sender, const ResponseMessage& message);
@@ -84,13 +84,13 @@ private:
*/
struct I2_ICINGA_API PendingRequest
{
- time_t Timeout;
+ double Timeout;
RequestMessage Request;
function Callback;
bool HasTimedOut(void) const
{
- return time(NULL) > Timeout;
+ return Utility::GetTime() > Timeout;
}
};
diff --git a/icinga/icingaapplication.cpp b/icinga/icingaapplication.cpp
index 582dc79a5..bbe451ae4 100644
--- a/icinga/icingaapplication.cpp
+++ b/icinga/icingaapplication.cpp
@@ -65,7 +65,7 @@ int IcingaApplication::Main(const vector& args)
Logger::Write(LogInformation, "icinga", "Icinga component loader (version: " ICINGA_VERSION ")");
#endif /* _WIN32 */
- time(&m_StartTime);
+ m_StartTime = Utility::GetTime();
if (args.size() < 2) {
stringstream msgbuf;
@@ -242,7 +242,7 @@ Dictionary::Ptr IcingaApplication::GetMacros(void) const
return m_Macros;
}
-time_t IcingaApplication::GetStartTime(void) const
+double IcingaApplication::GetStartTime(void) const
{
return m_StartTime;
}
diff --git a/icinga/icingaapplication.h b/icinga/icingaapplication.h
index 0bc10e4fd..15ef8cb0f 100644
--- a/icinga/icingaapplication.h
+++ b/icinga/icingaapplication.h
@@ -47,7 +47,7 @@ public:
String GetPidPath(void) const;
Dictionary::Ptr GetMacros(void) const;
- time_t GetStartTime(void) const;
+ double GetStartTime(void) const;
static const String DefaultPidPath;
@@ -59,7 +59,7 @@ private:
String m_PidPath;
Dictionary::Ptr m_Macros;
- time_t m_StartTime;
+ double m_StartTime;
Timer::Ptr m_RetentionTimer;