summaryrefslogtreecommitdiff
path: root/cpp/src/qpid/sys/windows
diff options
context:
space:
mode:
authorAndrew Stitcher <astitcher@apache.org>2009-05-12 19:50:45 +0000
committerAndrew Stitcher <astitcher@apache.org>2009-05-12 19:50:45 +0000
commit8ad39ce15e81423e635c4e4425fc71674e878ce5 (patch)
treea10df9f0a74ff1db1b7573c0b06a3d07cca35d77 /cpp/src/qpid/sys/windows
parentf215e6224b30b0ae10151b6d0cd063bdeb812b30 (diff)
downloadqpid-python-8ad39ce15e81423e635c4e4425fc71674e878ce5.tar.gz
QPID-1852 Removed thread unsafe code in Logger
Fixed some potentially iffy code in Connector.h if a derived Connector doesn't have activateSecurityLayer() git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@774051 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/qpid/sys/windows')
-rw-r--r--cpp/src/qpid/sys/windows/Time.cpp13
-rw-r--r--cpp/src/qpid/sys/windows/Time.h2
2 files changed, 14 insertions, 1 deletions
diff --git a/cpp/src/qpid/sys/windows/Time.cpp b/cpp/src/qpid/sys/windows/Time.cpp
index 2390826831..1d7b94e8d7 100644
--- a/cpp/src/qpid/sys/windows/Time.cpp
+++ b/cpp/src/qpid/sys/windows/Time.cpp
@@ -72,6 +72,7 @@ std::ostream& operator<<(std::ostream& o, const AbsTime& t) {
return o << time_string;
}
+
void toPtime(ptime& pt, const AbsTime& t) {
pt = t.getPrivate();
}
@@ -87,4 +88,16 @@ void usleep(uint64_t usecs) {
::Sleep(msecs);
}
+void outputFormattedNow(std::ostream& o) {
+ ::time_t rawtime;
+ ::tm timeinfo;
+ char time_string[100];
+
+ ::time( &rawtime );
+ ::localtime_s(&timeinfo, &rawtime);
+ ::strftime(time_string, 100,
+ "%Y-%m-%d %H:%M:%S",
+ &timeinfo);
+ o << time_string << " ";
+}
}}
diff --git a/cpp/src/qpid/sys/windows/Time.h b/cpp/src/qpid/sys/windows/Time.h
index 49b3c4bab3..2987b1c8b2 100644
--- a/cpp/src/qpid/sys/windows/Time.h
+++ b/cpp/src/qpid/sys/windows/Time.h
@@ -19,7 +19,7 @@
*
*/
-#include <boost/date_time/posix_time/posix_time.hpp>
+#include <boost/date_time/posix_time/posix_time_types.hpp>
namespace qpid {
namespace sys {