fixed an accuracy issue with timer classes on mac

This commit is contained in:
Arvid Norberg
2009-04-25 21:51:34 +00:00
parent b324d4a190
commit f7ebd88bec
2 changed files with 30 additions and 44 deletions

View File

@@ -355,6 +355,13 @@ int test_main()
{
using namespace libtorrent;
// make sure the time classes have correct semantics
TEST_CHECK(total_milliseconds(milliseconds(100)) == 100);
TEST_CHECK(total_milliseconds(milliseconds(1)) == 1);
TEST_CHECK(total_milliseconds(seconds(1)) == 1000);
// make sure the assumption we use in policy's peer list hold
std::multimap<address, int> peers;
std::multimap<address, int>::iterator i;