Changeset 2482
- Timestamp:
- 29/03/2009 15:08:12 (3 years ago)
- Location:
- box/trunk/lib/common
- Files:
-
- 4 edited
-
BoxTime.cpp (modified) (2 diffs)
-
BoxTime.h (modified) (1 diff)
-
Logging.cpp (modified) (2 diffs)
-
Timer.cpp (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
box/trunk/lib/common/BoxTime.cpp
r2203 r2482 54 54 } 55 55 56 std::string FormatTime(box_time_t time, bool showMicros)56 std::string FormatTime(box_time_t time, bool includeDate, bool showMicros) 57 57 { 58 58 std::ostringstream buf; … … 69 69 #endif 70 70 { 71 buf << std::setfill('0') << 72 std::setw(2) << tm_ptr->tm_hour << ":" << 71 buf << std::setfill('0'); 72 73 if (includeDate) 74 { 75 buf << std::setw(4) << (tm_ptr->tm_year + 1900) << "-" << 76 std::setw(2) << (tm_ptr->tm_mon + 1) << "-" << 77 std::setw(2) << (tm_ptr->tm_mday) << " "; 78 } 79 80 buf << std::setw(2) << tm_ptr->tm_hour << ":" << 73 81 std::setw(2) << tm_ptr->tm_min << ":" << 74 82 std::setw(2) << tm_ptr->tm_sec; -
box/trunk/lib/common/BoxTime.h
r2203 r2482 41 41 } 42 42 43 std::string FormatTime(box_time_t time, bool showMicros = false); 43 std::string FormatTime(box_time_t time, bool includeDate, 44 bool showMicros = false); 44 45 45 46 #endif // BOXTIME__H -
box/trunk/lib/common/Logging.cpp
r2466 r2482 289 289 if (sShowTime) 290 290 { 291 buf << FormatTime(GetCurrentBoxTime(), sShowTimeMicros);291 buf << FormatTime(GetCurrentBoxTime(), false, sShowTimeMicros); 292 292 buf << " "; 293 293 } … … 450 450 451 451 std::ostringstream buf; 452 buf << FormatTime(GetCurrentBoxTime(), false);452 buf << FormatTime(GetCurrentBoxTime(), true, false); 453 453 buf << " "; 454 454 -
box/trunk/lib/common/Timer.cpp
r2465 r2482 358 358 { 359 359 BOX_TRACE(TIMER_ID "initialised for " << timeoutSecs << 360 " secs, to fire at " << FormatTime(mExpires, true));360 " secs, to fire at " << FormatTime(mExpires, false, true)); 361 361 } 362 362 #endif
Note: See TracChangeset
for help on using the changeset viewer.
