13
0

temporal: add some relatively useless code to one of the timeline test functions

This commit is contained in:
Paul Davis 2022-03-30 15:13:46 -06:00
parent fc731419c5
commit 1d10408bd1

View File

@ -1,6 +1,7 @@
#include <iostream>
#include <stdlib.h>
#include "temporal/bbt_time.h"
#include "temporal/timeline.h"
#include "TimelineTest.h"
@ -11,6 +12,30 @@ using namespace Temporal;
void
TimelineTest::createTest()
{
using namespace Temporal;
using namespace std;
srandom (time (0));
vector<timepos_t> times;
for (int n = 0; n < 32767; ++n) {
times.push_back (timepos_t (random() % 32120321));
}
uint32_t lessthan = 0;
uint32_t greaterthan = 0;
for (vector<timepos_t>::iterator t = times.begin(); t != times.end(); ++t) {
if ((*t) + timepos_t (random() % 20207) < timepos_t (2299307)) {
lessthan++;
} else {
greaterthan++;
}
}
std::cerr << "LT " << lessthan << " GT " << greaterthan << std::endl;
}
void