File: common.cpp

package info (click to toggle)
bitseq 0.7.5+dfsg-5
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, sid
  • size: 676 kB
  • sloc: cpp: 7,043; python: 562; makefile: 150; sh: 52
file content (22 lines) | stat: -rw-r--r-- 606 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#include <cstdlib>
#include <string>

#include "common.h"

using namespace std;

void buildTime(char *argv0, string compileDate, string compileTime, const char* version){
#ifdef BIOC_BUILD
   return ; // dont want to print compile information
#endif
   message("### %s (version: %s) build: %s %s\n",argv0, version, compileDate.c_str(),compileTime.c_str());
}

bool progressLog(long cur,long outOf, long steps, char nl) {
   // output progress status every 10%
   if((outOf>steps)&&(cur%((long)(outOf/steps))==0)&&(cur!=0)){
      message("# %ld done.%c",cur,nl);
      return true;
   }
   return false;
}