#include <
string>
#include <iostream>
#include <time.h>
#include <fstream>
using namespace std;
void getSystemTime( string & stime){
time_t t = time( 0 );
char tmp[ 64];
strftime( tmp, sizeof(tmp), " %Y/%m/%d %X ",localtime(&t) );
stime=tmp;
}
int main(){
string nowtime;
getSystemTime(nowtime);
cout<<nowtime<<endl;
ofstream fout( " tt.txt ");
for( long i= 0; i< 1000* 1000; ++i){fout<<i<<endl;}
getSystemTime(nowtime);
cout<<nowtime<<endl;
}
#include <iostream>
#include <time.h>
#include <fstream>
using namespace std;
void getSystemTime( string & stime){
time_t t = time( 0 );
char tmp[ 64];
strftime( tmp, sizeof(tmp), " %Y/%m/%d %X ",localtime(&t) );
stime=tmp;
}
int main(){
string nowtime;
getSystemTime(nowtime);
cout<<nowtime<<endl;
ofstream fout( " tt.txt ");
for( long i= 0; i< 1000* 1000; ++i){fout<<i<<endl;}
getSystemTime(nowtime);
cout<<nowtime<<endl;
}