aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCJentzsch <jentzsch.software@gmail.com>2015-02-13 17:27:38 +0800
committerCJentzsch <jentzsch.software@gmail.com>2015-02-13 17:27:38 +0800
commitcdb7565707ccfc960a30fd403570f21f15d08253 (patch)
tree1cb0900aa5af8f2f648f061403780736d87f309f
parent10952220e33996a7fe6ec48a3570e9b777e6bf5e (diff)
downloaddexon-solidity-cdb7565707ccfc960a30fd403570f21f15d08253.tar.gz
dexon-solidity-cdb7565707ccfc960a30fd403570f21f15d08253.tar.zst
dexon-solidity-cdb7565707ccfc960a30fd403570f21f15d08253.zip
use auto for steady clock and chrono::milliseconds
-rw-r--r--vm.cpp14
1 files changed, 6 insertions, 8 deletions
diff --git a/vm.cpp b/vm.cpp
index af946777..faab4812 100644
--- a/vm.cpp
+++ b/vm.cpp
@@ -32,8 +32,6 @@ using namespace dev;
using namespace dev::eth;
using namespace dev::test;
-using Millisecs = chrono::duration<int,milli>;
-
FakeExtVM::FakeExtVM(eth::BlockInfo const& _previousBlock, eth::BlockInfo const& _currentBlock, unsigned _depth): /// TODO: XXX: remove the default argument & fix.
ExtVMFace(Address(), Address(), Address(), 0, 1, bytesConstRef(), bytes(), _previousBlock, _currentBlock, test::lastHashes(_currentBlock.number), _depth) {}
@@ -522,12 +520,12 @@ BOOST_AUTO_TEST_CASE(vmPerformanceTest)
string arg = boost::unit_test::framework::master_test_suite().argv[i];
if (arg == "--performance")
{
- chrono::steady_clock::time_point start = chrono::steady_clock::now();
+ auto start = chrono::steady_clock::now();
dev::test::executeTests("vmPerformanceTest", "/VMTests", dev::test::doVMTests);
- chrono::steady_clock::time_point end = chrono::steady_clock::now();
- Millisecs duration(chrono::duration_cast<Millisecs>(end - start));
+ auto end = chrono::steady_clock::now();
+ chrono::milliseconds duration(chrono::duration_cast<chrono::milliseconds>(end - start));
cnote << "test duration: " << duration.count() << " milliseconds.\n";
}
}
@@ -540,12 +538,12 @@ BOOST_AUTO_TEST_CASE(vmInputLimitsTest1)
string arg = boost::unit_test::framework::master_test_suite().argv[i];
if (arg == "--inputlimits")
{
- chrono::steady_clock::time_point start = chrono::steady_clock::now();
+ auto start = chrono::steady_clock::now();
dev::test::executeTests("vmInputLimitsTest1", "/VMTests", dev::test::doVMTests);
- chrono::steady_clock::time_point end = chrono::steady_clock::now();
- Millisecs duration(chrono::duration_cast<Millisecs>(end - start));
+ auto end = chrono::steady_clock::now();
+ chrono::milliseconds duration(chrono::duration_cast<chrono::milliseconds>(end - start));
cnote << "test duration: " << duration.count() << " milliseconds.\n";
}
}