]> git.donarmstrong.com Git - rsem.git/blobdiff - utils.h
Allowed > 2^31 hits
[rsem.git] / utils.h
diff --git a/utils.h b/utils.h
index 278e95e9272ca67f36de745dc924f40fd7085ca6..b15f154d3a94bb0dbfa1a1fbb5473b877c70544a 100644 (file)
--- a/utils.h
+++ b/utils.h
 #include<cassert>
 #include<string>
 #include<vector>
+#include<stdint.h>
+
+typedef uint64_t HIT_INT_TYPE;
+typedef uint64_t READ_INT_TYPE;
 
 const int STRLEN = 10005 ;
 const double EPSILON = 1e-300;
@@ -120,20 +124,6 @@ inline std::string cleanStr(const std::string& str) {
   return (fr <= to ? str.substr(fr, to - fr + 1) : "");
 }
 
-void printTimeUsed(const time_t& a, const time_t& b, const char* filename = "") {
-       int hh = (b - a) / 3600;
-       int mm = (b - a) % 3600 / 60;
-       int ss = (b - a) % 60;
-
-       printf("Time Used : %d h %02d m %02d s\n", hh, mm, ss);
-
-       if (strcmp(filename, "")) {
-               FILE *fo = fopen(filename, "w");
-               fprintf(fo, "Time Used : %d h %02d m %02d s\n", hh, mm, ss);
-               fclose(fo);
-       }
-}
-
 void genReadFileNames(const char* readFN, int tagType, int read_type, int& s, char readFs[][STRLEN]){
        const char tags[3][STRLEN] = {"un", "alignable", "max"};
        char suffix[STRLEN];
@@ -156,4 +146,12 @@ void genReadFileNames(const char* readFN, int tagType, int read_type, int& s, ch
        }
 }
 
+void printTimeUsed(const time_t& a, const time_t& b, const char* program_name) {
+       int hh = (b - a) / 3600;
+       int mm = (b - a) % 3600 / 60;
+       int ss = (b - a) % 60;
+
+       printf("Time Used for %s : %d h %02d m %02d s\n", program_name, hh, mm, ss);
+}
+
 #endif