Migrate more code into the chrono type system:

Changes include:

  *  Database::tune and all tune overrides
  *  TaggedCache TargetAge
  *  KeyCache TargetAge
This commit is contained in:
Howard Hinnant
2018-06-25 12:27:59 -04:00
committed by Nik Bougalis
parent 574ea2c14d
commit d257d1b2c9
24 changed files with 76 additions and 73 deletions

View File

@@ -29,6 +29,7 @@ class KeyCache_test : public beast::unit_test::suite
public:
void run () override
{
using namespace std::chrono_literals;
TestStopwatch clock;
clock.set (0);
@@ -37,7 +38,7 @@ public:
// Insert an item, retrieve it, and age it so it gets purged.
{
Cache c ("test", clock, 1, 2);
Cache c ("test", clock, 1, 2s);
BEAST_EXPECT(c.size () == 0);
BEAST_EXPECT(c.insert ("one"));
@@ -58,7 +59,7 @@ public:
// Insert two items, have one expire
{
Cache c ("test", clock, 2, 2);
Cache c ("test", clock, 2, 2s);
BEAST_EXPECT(c.insert ("one"));
BEAST_EXPECT(c.size () == 1);
@@ -76,7 +77,7 @@ public:
// Insert three items (1 over limit), sweep
{
Cache c ("test", clock, 2, 3);
Cache c ("test", clock, 2, 3s);
BEAST_EXPECT(c.insert ("one"));
++clock;