[prev in list] [next in list] [prev in thread] [next in thread]
List: log4cxx-dev
Subject: svn commit: r1707615 - /incubator/log4cxx/trunk/src/test/cpp/rolling/timebasedrollingtest.cpp
From: tschoening () apache ! org
Date: 2015-10-08 20:11:38
Message-ID: 20151008201138.1C7193A02E5 () svn01-us-west ! apache ! org
[Download RAW message or body]
Author: tschoening
Date: Thu Oct 8 20:11:37 2015
New Revision: 1707615
URL: http://svn.apache.org/viewvc?rev=1707615&view=rev
Log:
Added delayUntilNextSecondWithMsg because the same msg was hard coded 3 times.
Modified:
incubator/log4cxx/trunk/src/test/cpp/rolling/timebasedrollingtest.cpp
Modified: incubator/log4cxx/trunk/src/test/cpp/rolling/timebasedrollingtest.cpp
URL: http://svn.apache.org/viewvc/incubator/log4cxx/trunk/src/test/cpp/rolling/timebasedrollingtest.cpp?rev=1707615&r1=1707614&r2=1707615&view=diff
==============================================================================
--- incubator/log4cxx/trunk/src/test/cpp/rolling/timebasedrollingtest.cpp (original)
+++ incubator/log4cxx/trunk/src/test/cpp/rolling/timebasedrollingtest.cpp Thu Oct 8 \
20:11:37 2015 @@ -112,9 +112,7 @@ public:
now += APR_USEC_PER_SEC;
} }
- std::cout << "Waiting until next second and 100 millis.";
- delayUntilNextSecond(100);
- std::cout << "Done waiting.";
+ delayUntilNextSecondWithMsg(100);
{ for (int i = 0; i < 5; i++) {
std::string message("Hello---");
@@ -275,9 +273,7 @@ public:
} }
filenames[3] = LOG4CXX_STR("output/test4.log");
- std::cout << "Waiting until next second and 100 millis.";
- delayUntilNextSecond(100);
- std::cout << "Done waiting.";
+ delayUntilNextSecondWithMsg(100);
{ for (int i = 0; i <= 2; i++) {
std::string message("Hello---");
@@ -346,9 +342,7 @@ public:
} }
filenames[3] = LOG4CXX_STR("output/test5.log");
- std::cout << "Waiting until next second and 100 millis.";
- delayUntilNextSecond(100);
- std::cout << "Done waiting.";
+ delayUntilNextSecondWithMsg(100);
{ for (int i = 0; i < 5; i++) {
std::string message("Hello---");
@@ -422,6 +416,13 @@ public:
apr_sleep(next - now);
}
+ void delayUntilNextSecondWithMsg(int millis)
+ {
+ std::cout << "Waiting until next second and 100 millis.";
+ delayUntilNextSecond(100);
+ std::cout << "Done waiting.";
+ }
+
void delayUntilNextMinute(int seconds) {
apr_time_t now = apr_time_now();
apr_time_t next = ((now / APR_USEC_PER_SEC) + 1) * APR_USEC_PER_SEC
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic