X-Git-Url: https://git.pterodactylus.net/?p=fms.git;a=blobdiff_plain;f=src%2Ffreenet%2Funkeyedidcreator.cpp;h=e23a81c917493620c8297d154f8cf27f355bafa9;hp=6facf8644f7c38860883821afb4c5c908ce0034e;hb=dec33c63afafabf83c3039e916725cac6faef9b3;hpb=9b22dd53fe62e312c1647310b7ec43aa127090af diff --git a/src/freenet/unkeyedidcreator.cpp b/src/freenet/unkeyedidcreator.cpp index 6facf86..e23a81c 100644 --- a/src/freenet/unkeyedidcreator.cpp +++ b/src/freenet/unkeyedidcreator.cpp @@ -1,6 +1,8 @@ #include "../../include/freenet/unkeyedidcreator.h" #include "../../include/stringfunctions.h" +#include + #include #ifdef XMEM @@ -50,7 +52,7 @@ void UnkeyedIDCreator::CheckForUnkeyedID() } // set last checked time to now - m_lastchecked.SetToGMTime(); + m_lastchecked=Poco::Timestamp(); } @@ -75,7 +77,7 @@ const bool UnkeyedIDCreator::HandleMessage(FCPMessage &message) SaveKeys(id,message["RequestURI"],message["InsertURI"]); } - m_log->WriteLog(LogFile::LOGLEVEL_INFO,"UnkeyedIDCreator::HandleMessage received keypair"); + m_log->information("UnkeyedIDCreator::HandleMessage received keypair"); m_waiting=false; @@ -90,16 +92,15 @@ const bool UnkeyedIDCreator::HandleMessage(FCPMessage &message) void UnkeyedIDCreator::Initialize() { m_waiting=false; - m_lastchecked.SetToGMTime(); + m_lastchecked=Poco::Timestamp(); } void UnkeyedIDCreator::Process() { - DateTime now; - now.SetToGMTime(); + Poco::DateTime now; // only perform check every minute (1/1440 of 1 day) - if(m_waiting==false && m_lastchecked<(now-(1.0/1440.0))) + if(m_waiting==false && m_lastchecked<(now-Poco::Timespan(0,0,1,0,0))) { CheckForUnkeyedID(); }