File tree 1 file changed +3
-10
lines changed
1 file changed +3
-10
lines changed Original file line number Diff line number Diff line change 22
22
#include < vector>
23
23
#include < sstream>
24
24
#include < cstring>
25
- #include < ctime>
26
25
#include < cassert>
27
26
#include < chrono>
28
27
@@ -240,9 +239,7 @@ bool Answer::ParseCommand(
240
239
241
240
bool Answer::RunCommand (const std::string &loopsuffix) {
242
241
std::cout << " ## Answer ##" << std::endl;
243
- char buf[256 ];
244
- time_t secsnow = time (NULL );
245
- cout << " Answer: starting at " << ctime_r (&secsnow, buf) << endl;
242
+ cout << " Answer: starting at " << system_clock::now () << endl;
246
243
247
244
// set up
248
245
PString token;
@@ -287,9 +284,7 @@ bool Hangup::ParseCommand(
287
284
bool Hangup::RunCommand (const std::string &loopsuffix) {
288
285
289
286
std::cout << " ## Hangup ##" << std::endl;
290
- char buf[256 ];
291
- time_t secsnow = time (NULL );
292
- cout << " Hangup: at " << ctime_r (&secsnow, buf) << endl;
287
+ cout << " Hangup: at " << system_clock::now () << endl;
293
288
TPState &tpstate = TPState::Instance ();
294
289
295
290
// hangup
@@ -597,12 +592,10 @@ bool Loop::RunCommand(const std::string &loopsuffix) {
597
592
598
593
int timesleft = 0 ;
599
594
do {
600
- char buf[256 ];
601
- time_t secsnow = time (NULL );
602
595
stringstream newsuffix;
603
596
newsuffix << loopsuffix << " _" << timesleft;
604
597
cout << " Loop: iteration \" " << newsuffix.str ()
605
- << " \" at " << ctime_r (&secsnow, buf ) << endl;
598
+ << " \" at " << system_clock::now ( ) << endl;
606
599
607
600
if (!Command::Run (loopedsequence, newsuffix.str ()))
608
601
return false ;
You can’t perform that action at this time.
0 commit comments