summaryrefslogtreecommitdiff
path: root/cpp/src/qpid/sys/posix/Time.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/src/qpid/sys/posix/Time.cpp')
-rw-r--r--cpp/src/qpid/sys/posix/Time.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/cpp/src/qpid/sys/posix/Time.cpp b/cpp/src/qpid/sys/posix/Time.cpp
index dee393f4bf..272c6c21a5 100644
--- a/cpp/src/qpid/sys/posix/Time.cpp
+++ b/cpp/src/qpid/sys/posix/Time.cpp
@@ -114,7 +114,9 @@ void outputFormattedNow(std::ostream& o) {
void outputHiresNow(std::ostream& o) {
::timespec time;
::clock_gettime(CLOCK_REALTIME, &time);
- o << time.tv_sec << "." << std::setw(9) << std::setfill('0') << time.tv_nsec << "s ";
+ ::time_t seconds = time.tv_sec;
+ outputFormattedTime(o, &seconds);
+ o << "." << std::setw(9) << std::setfill('0') << time.tv_nsec << " ";
}
void sleep(int secs) {