/[projects]/misc/mysql_splitter/splitter.cpp
ViewVC logotype

Diff of /misc/mysql_splitter/splitter.cpp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1463 by torben, Thu May 12 16:33:18 2011 UTC revision 1464 by torben, Thu May 12 19:38:56 2011 UTC
# Line 1  Line 1 
1  #include <iostream>  #include <iostream>
2    #include <iomanip>
3  #include <sstream>  #include <sstream>
4  #include <string>  #include <string>
5  #include <vector>  #include <vector>
# Line 91  int main(int argc, char** argv) { Line 92  int main(int argc, char** argv) {
92          }          }
93    
94    
95          FILE* in = fopen( inputfile.c_str(), "r" );          FILE* in = fopen64( inputfile.c_str(), "r" );
96          FILE* out = NULL;          FILE* out = NULL;
97          //ifstream in( inputfile.c_str() );          //ifstream in( inputfile.c_str() );
98          //ofstream out;          //ofstream out;
# Line 100  int main(int argc, char** argv) { Line 101  int main(int argc, char** argv) {
101    
102          if ( in == NULL ) {          if ( in == NULL ) {
103                  cout << "Could not open " << argv[1] << endl;                  cout << "Could not open " << argv[1] << endl;
104                    perror("");
105                  return 2;                  return 2;
106          }          }
107    
# Line 171  int main(int argc, char** argv) { Line 173  int main(int argc, char** argv) {
173    
174      time_t end = time(NULL);      time_t end = time(NULL);
175    
176      cout << "Elapsed " << (end-start) << " seconds" << endl;  
177            time_t elapsed = end-start;
178            cout << setfill('0') << "Elapsed time " << elapsed/60 << ":" << setw(2) << elapsed%60 << endl;
179    
180          fclose(in);          fclose(in);
181  }  }

Legend:
Removed from v.1463  
changed lines
  Added in v.1464

  ViewVC Help
Powered by ViewVC 1.1.20