MCPcopy Create free account
hub / github.com/JeanLucPons/VanitySearch / getResult

Method getResult

Timer.cpp:137–149  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

135
136
137std::string Timer::getResult(char *unit, int nbTry, double t0, double t1) {
138
139 char tmp[256];
140 int pIdx = 0;
141 double nbCallPerSec = (double)nbTry / (t1 - t0);
142 while (nbCallPerSec > 1000.0 && pIdx < 5) {
143 pIdx++;
144 nbCallPerSec = nbCallPerSec / 1000.0;
145 }
146 sprintf(tmp, "%.3f %s%s/sec", nbCallPerSec, prefix[pIdx], unit);
147 return std::string(tmp);
148
149}
150
151void Timer::printResult(char *unit, int nbTry, double t0, double t1) {
152

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected