diff --git a/tests/management/nfd-status.cpp b/tests/management/nfd-status.cpp
index b5d408c..ef411a4 100644
--- a/tests/management/nfd-status.cpp
+++ b/tests/management/nfd-status.cpp
@@ -18,8 +18,8 @@
 {
   Status status1;
   status1.setNfdVersion(1014210635);
-  status1.setStartTimestamp(Status::Timestamp(boost::chrono::seconds(375193249)));
-  status1.setCurrentTimestamp(Status::Timestamp(boost::chrono::seconds(1886109034)));
+  status1.setStartTimestamp(time::fromUnixTimestamp(time::seconds(375193249)));
+  status1.setCurrentTimestamp(time::fromUnixTimestamp(time::seconds(1886109034)));
   status1.setNNameTreeEntries(1849943160);
   status1.setNFibEntries(621739748);
   status1.setNPitEntries(482129741);
diff --git a/tests/management/test-ndnd-forwarding-entry.cpp b/tests/management/test-ndnd-forwarding-entry.cpp
index 1c1afb8..7ad5c94 100644
--- a/tests/management/test-ndnd-forwarding-entry.cpp
+++ b/tests/management/test-ndnd-forwarding-entry.cpp
@@ -30,7 +30,7 @@
 
 BOOST_AUTO_TEST_CASE (Encode)
 {
-  ForwardingEntry forwardingEntry("selfreg", "/a/prefix", -1, ForwardingFlags(), -1);
+  ForwardingEntry forwardingEntry("selfreg", "/a/prefix", -1, ForwardingFlags(), time::milliseconds::min());
   const Block &wire = forwardingEntry.wireEncode();
 
   BOOST_REQUIRE_EQUAL_COLLECTIONS(FORWARDING_ENTRY, FORWARDING_ENTRY+sizeof(FORWARDING_ENTRY),
@@ -54,7 +54,7 @@
   BOOST_REQUIRE_EQUAL(forwardingEntry.getForwardingFlags().getLocal(), false);
   BOOST_REQUIRE_EQUAL(forwardingEntry.getForwardingFlags().getTap(), false);
   BOOST_REQUIRE_EQUAL(forwardingEntry.getForwardingFlags().getCaptureOk(), false);
-  BOOST_REQUIRE_EQUAL(forwardingEntry.getFreshnessPeriod(), -1);
+  BOOST_REQUIRE_EQUAL(forwardingEntry.getFreshnessPeriod(), time::milliseconds::min());
 }
 
 BOOST_AUTO_TEST_SUITE_END()
diff --git a/tests/management/test-nrd.cpp b/tests/management/test-nrd.cpp
index de95ee2..92622f0 100644
--- a/tests/management/test-nrd.cpp
+++ b/tests/management/test-nrd.cpp
@@ -39,7 +39,7 @@
   std::ostringstream os;
   os << opt;
   BOOST_CHECK_EQUAL(os.str(), "PrefixRegOptions(Prefix: /localhost/reg/test, "
-                    "FaceID: 0, Flags: 1, Cost: 0, ExpirationPeriod: -1, Protocol: )");
+                    "FaceID: 0, Flags: 1, Cost: 0, ExpirationPeriod: -9223372036854775808 milliseconds, Protocol: )");
 }
 
 BOOST_AUTO_TEST_CASE (PrefixRegOptionsDecoding)
diff --git a/tests/security/test-certificate-cache.cpp b/tests/security/test-certificate-cache.cpp
index 3718170..ee7fd6f 100644
--- a/tests/security/test-certificate-cache.cpp
+++ b/tests/security/test-certificate-cache.cpp
@@ -25,17 +25,17 @@
 BOOST_AUTO_TEST_CASE (Ttl)
 {
   shared_ptr<boost::asio::io_service> io = make_shared<boost::asio::io_service>();
-  shared_ptr<CertificateCacheTtl> cache = make_shared<CertificateCacheTtl>(io, 1);
+  shared_ptr<CertificateCacheTtl> cache = make_shared<CertificateCacheTtl>(io, time::seconds(1));
   Scheduler scheduler(*io);
 
   shared_ptr<IdentityCertificate> cert1 = make_shared<IdentityCertificate>();
   Name certName1("/tmp/KEY/ksk-1/ID-CERT/1");
   cert1->setName(certName1);
-  cert1->setFreshnessPeriod(500);
+  cert1->setFreshnessPeriod(time::milliseconds(500));
   shared_ptr<IdentityCertificate> cert2 = make_shared<IdentityCertificate>();
   Name certName2("/tmp/KEY/ksk-2/ID-CERT/2");
   cert2->setName(certName2);
-  cert2->setFreshnessPeriod(1000);
+  cert2->setFreshnessPeriod(time::milliseconds(1000));
 
   Name name1 = certName1.getPrefix(-1);
   Name name2 = certName2.getPrefix(-1);
@@ -43,13 +43,13 @@
   cache->insertCertificate(cert1);
   cache->insertCertificate(cert2);
 
-  scheduler.scheduleEvent(time::seconds(0.3), bind(&getCertificateTtl, cache, name1, true));
-  scheduler.scheduleEvent(time::seconds(0.3), bind(&getCertificateTtl, cache, name2, true));
-  scheduler.scheduleEvent(time::seconds(0.6), bind(&getCertificateTtl, cache, name1, false));
-  scheduler.scheduleEvent(time::seconds(0.6), bind(&getCertificateTtl, cache, name2, true));
-  scheduler.scheduleEvent(time::seconds(0.6), bind(&CertificateCache::insertCertificate, &*cache, cert2));
-  scheduler.scheduleEvent(time::seconds(1.3), bind(&getCertificateTtl, cache, name2, true));
-  scheduler.scheduleEvent(time::seconds(1.7), bind(&getCertificateTtl, cache, name2, false));
+  scheduler.scheduleEvent(time::milliseconds(300),  bind(&getCertificateTtl, cache, name1, true));
+  scheduler.scheduleEvent(time::milliseconds(300),  bind(&getCertificateTtl, cache, name2, true));
+  scheduler.scheduleEvent(time::milliseconds(600),  bind(&getCertificateTtl, cache, name1, false));
+  scheduler.scheduleEvent(time::milliseconds(600),  bind(&getCertificateTtl, cache, name2, true));
+  scheduler.scheduleEvent(time::milliseconds(600),  bind(&CertificateCache::insertCertificate, &*cache, cert2));
+  scheduler.scheduleEvent(time::milliseconds(1300), bind(&getCertificateTtl, cache, name2, true));
+  scheduler.scheduleEvent(time::milliseconds(1700), bind(&getCertificateTtl, cache, name2, false));
 
   io->run();
 }
diff --git a/tests/security/test-encode-decode-certificate.cpp b/tests/security/test-encode-decode-certificate.cpp
index 409e757..3b8cc83 100644
--- a/tests/security/test-encode-decode-certificate.cpp
+++ b/tests/security/test-encode-decode-certificate.cpp
@@ -83,8 +83,8 @@
 const std::string CERT_INFO = "Certificate name:\n"
   "  /\n"
   "Validity:\n"
-  "  NotBefore: 20131226T232254.000000\n"
-  "  NotAfter: 20131226T232254.000000\n"
+  "  NotBefore: 20131226T232254\n"
+  "  NotAfter: 20131226T232254\n"
   "Subject Description:\n"
   "  2.5.4.41: TEST NAME\n"
   "Public key bits:\n"
@@ -98,8 +98,8 @@
   ndn::Certificate c;
 
   // validity
-  c.setNotBefore(1388100174000); // 12/26/2013 @ 11:22pm
-  c.setNotAfter(1388100174000); // 12/26/2013 @ 11:22pm
+  c.setNotBefore(time::fromUnixTimestamp(time::milliseconds(1388100174000))); // 12/26/2013 @ 11:22pm
+  c.setNotAfter(time::fromUnixTimestamp(time::milliseconds(1388100174000))); // 12/26/2013 @ 11:22pm
 
   // subject
   c.addSubjectDescription(CertificateSubjectDescription("2.5.4.41", "TEST NAME"));
@@ -131,19 +131,19 @@
   // p.Load(source);
 
   BOOST_REQUIRE_NO_THROW(c.encode());
-  
+
   // ofstream of("cert.out");
   // of.write((const char*)c.getContent().value(), c.getContent().value_size());
   
   // const Block &wire = i.wireEncode();
   BOOST_REQUIRE_EQUAL_COLLECTIONS(CERT, CERT+sizeof(CERT),
-                                c.getContent().value_begin(), c.getContent().value_end());
+                                  c.getContent().value_begin(), c.getContent().value_end());
 
   std::ostringstream os;
   os << c << std::endl;
   std::string info(os.str());
-  BOOST_REQUIRE_EQUAL_COLLECTIONS(CERT_INFO.begin(), CERT_INFO.end(),
-                                  info.begin(), info.end());
+
+  BOOST_CHECK_EQUAL(CERT_INFO, info);
 }
 
 const unsigned char REAL_CERT[] = {
@@ -153,8 +153,8 @@
 const std::string REAL_CERT_INFO = "Certificate name:\n"
 "  /tmp\n"
 "Validity:\n"
-"  NotBefore: 20131101T171122.000000\n"
-"  NotAfter: 20141101T171122.000000\n"
+"  NotBefore: 20131101T171122\n"
+"  NotAfter: 20141101T171122\n"
 "Subject Description:\n"
 "  2.5.4.41: NDN Testbed Root\n"
 "Public key bits:\n"
@@ -176,8 +176,7 @@
   std::ostringstream os;
   os << c << std::endl;
   std::string info(os.str());
-  BOOST_REQUIRE_EQUAL_COLLECTIONS(REAL_CERT_INFO.begin(), REAL_CERT_INFO.end(),
-                                  info.begin(), info.end());
+  BOOST_CHECK_EQUAL(REAL_CERT_INFO, info);
 }
 
 BOOST_AUTO_TEST_SUITE_END()
diff --git a/tests/security/test-keychain.cpp b/tests/security/test-keychain.cpp
index 3e9b4fc..8a76b79 100644
--- a/tests/security/test-keychain.cpp
+++ b/tests/security/test-keychain.cpp
@@ -7,7 +7,6 @@
 #include <boost/test/unit_test.hpp>
 
 #include "security/key-chain.hpp"
-#include "util/time.hpp"
 
 using namespace std;
 
@@ -19,7 +18,8 @@
 {
   KeyChainImpl<SecPublicInfoSqlite3, SecTpmFile> keyChain;
 
-  Name identity(string("/TestKeyChain/ExportIdentity/") + boost::lexical_cast<std::string>(time::now()));
+  Name identity("/TestKeyChain/ExportIdentity/");
+  identity.appendVersion();
   keyChain.createIdentity(identity);
   
   shared_ptr<SecuredBag> exported = keyChain.exportIdentity(identity, "1234");
@@ -60,28 +60,30 @@
 {
   KeyChainImpl<SecPublicInfoSqlite3, SecTpmFile> keyChain;
   
-  Name identity(string("/TestKeyChain/PrepareIdentityCertificate/") + boost::lexical_cast<std::string>(time::now()));
+  Name identity("/TestKeyChain/PrepareIdentityCertificate/");
+  identity.appendVersion();
   keyChain.createIdentity(identity);
 
   vector<CertificateSubjectDescription> subjectDescription;
   Name lowerIdentity = identity;
-  lowerIdentity.append("Lower").append(boost::lexical_cast<std::string>(time::now()));
+  lowerIdentity.append("Lower").appendVersion();
   Name lowerKeyName = keyChain.generateRSAKeyPair(lowerIdentity, true);
   shared_ptr<IdentityCertificate> idCert
     = keyChain.prepareUnsignedIdentityCertificate(lowerKeyName, identity,
-						  time::now() / 1000000,
-						  time::now() / 1000000 + 630720000,
+						  time::system_clock::now(),
+						  time::system_clock::now() + time::days(365),
 						  subjectDescription);
   BOOST_CHECK(static_cast<bool>(idCert));
   BOOST_CHECK(idCert->getName().getPrefix(5) == Name().append(identity).append("KEY").append("Lower"));
 
 
-  Name anotherIdentity(string("/TestKeyChain/PrepareIdentityCertificate/Another/") + boost::lexical_cast<std::string>(time::now()));
+  Name anotherIdentity("/TestKeyChain/PrepareIdentityCertificate/Another/");
+  anotherIdentity.appendVersion();
   Name anotherKeyName = keyChain.generateRSAKeyPair(anotherIdentity, true);
   shared_ptr<IdentityCertificate> idCert2
     = keyChain.prepareUnsignedIdentityCertificate(anotherKeyName, identity,
-						  time::now() / 1000000,
-						  time::now() / 1000000 + 630720000,
+						  time::system_clock::now(),
+						  time::system_clock::now() + time::days(365),
 						  subjectDescription);
   BOOST_CHECK(static_cast<bool>(idCert2));
   BOOST_CHECK(idCert2->getName().getPrefix(5) == Name().append(anotherIdentity).append("KEY"));
@@ -90,8 +92,8 @@
   Name wrongKeyName1;
   shared_ptr<IdentityCertificate> idCert3
     = keyChain.prepareUnsignedIdentityCertificate(wrongKeyName1, identity,
-						  time::now() / 1000000,
-						  time::now() / 1000000 + 630720000,
+						  time::system_clock::now(),
+						  time::system_clock::now() + time::days(365),
 						  subjectDescription);
   BOOST_CHECK(!static_cast<bool>(idCert3));
 
@@ -99,8 +101,8 @@
   Name wrongKeyName2("/TestKeyChain/PrepareIdentityCertificate");
   shared_ptr<IdentityCertificate> idCert4
     = keyChain.prepareUnsignedIdentityCertificate(wrongKeyName2, identity,
-						  time::now() / 1000000,
-						  time::now() / 1000000 + 630720000,
+						  time::system_clock::now(),
+						  time::system_clock::now() + time::days(365),
 						  subjectDescription);
   BOOST_CHECK(!static_cast<bool>(idCert4));
   
@@ -108,8 +110,8 @@
   Name wrongKeyName3("/TestKeyChain/PrepareIdentityCertificate/ksk-1234");
   shared_ptr<IdentityCertificate> idCert5
     = keyChain.prepareUnsignedIdentityCertificate(wrongKeyName3, identity,
-						  time::now() / 1000000,
-						  time::now() / 1000000 + 630720000,
+						  time::system_clock::now(),
+						  time::system_clock::now() + time::days(365),
 						  subjectDescription);
   BOOST_CHECK(!static_cast<bool>(idCert5));
 
diff --git a/tests/security/test-sec-public-info-sqlite3.cpp b/tests/security/test-sec-public-info-sqlite3.cpp
index 8928ebf..c50183d 100644
--- a/tests/security/test-sec-public-info-sqlite3.cpp
+++ b/tests/security/test-sec-public-info-sqlite3.cpp
@@ -22,7 +22,9 @@
 {
   KeyChainImpl<SecPublicInfoSqlite3, SecTpmFile> keyChain;
 
-  Name identity("/TestSecPublicInfoSqlite3/Delete/" + boost::lexical_cast<string>(time::now()));
+  Name identity("/TestSecPublicInfoSqlite3/Delete");
+  identity.appendVersion();
+
   Name certName1;
   BOOST_REQUIRE_NO_THROW(certName1 = keyChain.createIdentity(identity));
 
diff --git a/tests/security/test-sec-tpm-file.cpp b/tests/security/test-sec-tpm-file.cpp
index 146a1e1..70fada8 100644
--- a/tests/security/test-sec-tpm-file.cpp
+++ b/tests/security/test-sec-tpm-file.cpp
@@ -24,7 +24,7 @@
 {
   SecTpmFile tpm;
   
-  Name keyName("/TestSecTpmFile/Delete/ksk-" + boost::lexical_cast<string>(time::now()));
+  Name keyName("/TestSecTpmFile/Delete/ksk-" + boost::lexical_cast<string>(time::toUnixTimestamp(time::system_clock::now())));
   BOOST_CHECK_NO_THROW(tpm.generateKeyPairInTpm(keyName, KEY_TYPE_RSA, 2048));
   
   BOOST_REQUIRE_EQUAL(tpm.doesKeyExistInTpm(keyName, KEY_CLASS_PUBLIC), true);
@@ -40,7 +40,7 @@
 {
   SecTpmFile tpm;
 
-  Name keyName("/TestSecTpmFile/SignVerify/ksk-" + boost::lexical_cast<string>(time::now()));
+  Name keyName("/TestSecTpmFile/SignVerify/ksk-" + boost::lexical_cast<string>(time::toUnixTimestamp(time::system_clock::now())));
   BOOST_CHECK_NO_THROW(tpm.generateKeyPairInTpm(keyName, KEY_TYPE_RSA, 2048));
   
   Data data("/tmp/test/1");
@@ -107,7 +107,7 @@
 
   SecTpmFile tpm;
 
-  Name keyName("/TestSecTpmFile/ImportKey/ksk-" + boost::lexical_cast<string>(time::now()));
+  Name keyName("/TestSecTpmFile/ImportKey/ksk-" + boost::lexical_cast<string>(time::toUnixTimestamp(time::system_clock::now())));
 
   BOOST_REQUIRE(tpm.doesKeyExistInTpm(keyName, KEY_CLASS_PRIVATE) == false);
   BOOST_REQUIRE(tpm.doesKeyExistInTpm(keyName, KEY_CLASS_PUBLIC) == false);
diff --git a/tests/security/test-sec-tpm-osx.cpp b/tests/security/test-sec-tpm-osx.cpp
index d75eec1..a08dc48 100644
--- a/tests/security/test-sec-tpm-osx.cpp
+++ b/tests/security/test-sec-tpm-osx.cpp
@@ -25,7 +25,8 @@
 {
   SecTpmOsx tpm;
   
-  Name keyName("/TestSecTpmOsx/Delete/ksk-" + boost::lexical_cast<string>(time::now()));
+  Name keyName("/TestSecTpmOsx/Delete/ksk-" + boost::lexical_cast<string>(
+                                                time::toUnixTimestamp(time::system_clock::now()).count()));
   BOOST_CHECK_NO_THROW(tpm.generateKeyPairInTpm(keyName, KEY_TYPE_RSA, 2048));
   
   BOOST_REQUIRE_EQUAL(tpm.doesKeyExistInTpm(keyName, KEY_CLASS_PUBLIC), true);
@@ -41,7 +42,8 @@
 {
   SecTpmOsx tpm;
 
-  Name keyName("/TestSecTpmOsx/SignVerify/ksk-" + boost::lexical_cast<string>(time::now()));
+  Name keyName("/TestSecTpmOsx/SignVerify/ksk-" + boost::lexical_cast<string>(
+                                                    time::toUnixTimestamp(time::system_clock::now()).count()));
   BOOST_CHECK_NO_THROW(tpm.generateKeyPairInTpm(keyName, KEY_TYPE_RSA, 2048));
   
   Data data("/TestSecTpmOsx/SignVaerify/Data/1");
@@ -102,7 +104,8 @@
 
   SecTpmOsx tpm;
 
-  Name keyName("/TestSecTpmOsx/ExportImportKey/ksk-" + boost::lexical_cast<string>(time::now()));
+  Name keyName("/TestSecTpmOsx/ExportImportKey/ksk-" + boost::lexical_cast<string>(
+                                                         time::toUnixTimestamp(time::system_clock::now()).count()));
   
   BOOST_CHECK_NO_THROW(tpm.generateKeyPairInTpm(keyName, KEY_TYPE_RSA, 2048));
 
diff --git a/tests/security/test-signed-interest.cpp b/tests/security/test-signed-interest.cpp
index f6898b9..db051c3 100644
--- a/tests/security/test-signed-interest.cpp
+++ b/tests/security/test-signed-interest.cpp
@@ -21,22 +21,24 @@
 {
   KeyChainImpl<SecPublicInfoSqlite3, SecTpmFile> keyChain;
 
-  Name identityName("/TestSignedInterest/SignVerify/" + boost::lexical_cast<string>(time::now()));
+  Name identityName("/TestSignedInterest/SignVerify");
+  identityName.appendVersion();
+
   Name certificateName;
   BOOST_REQUIRE_NO_THROW(certificateName = keyChain.createIdentity(identityName));
 
   Interest interest("/TestSignedInterest/SignVerify/Interest1");
   BOOST_CHECK_NO_THROW(keyChain.signByIdentity(interest, identityName));
-  
+
   Block interestBlock(interest.wireEncode().wire(), interest.wireEncode().size());
 
   Interest interest2;
   interest2.wireDecode(interestBlock);
-  
+
   shared_ptr<PublicKey> publicKey;
   BOOST_REQUIRE_NO_THROW(publicKey = keyChain.getPublicKeyFromTpm(keyChain.getDefaultKeyNameForIdentity(identityName)));
   bool result = Validator::verifySignature(interest2, *publicKey);
-  
+
   BOOST_CHECK_EQUAL(result, true);
 
   keyChain.deleteIdentity(identityName);
@@ -48,7 +50,7 @@
   CommandInterestFixture()
     : m_validity(false)
   {}
-  
+
   void
   validated(const shared_ptr<const Interest>& interest)
   { m_validity = true; }
@@ -56,7 +58,7 @@
   void
   validationFailed(const shared_ptr<const Interest>& interest, const string& failureInfo)
   {
-    m_validity = false; 
+    m_validity = false;
   }
 
   void
@@ -64,12 +66,14 @@
   { m_validity = false; }
 
   bool m_validity;
-}; 
+};
 
 BOOST_FIXTURE_TEST_CASE (CommandInterest, CommandInterestFixture)
 {
   KeyChain keyChain;
-  Name identity("/TestCommandInterest/Validation/" + boost::lexical_cast<string>(time::now()));
+  Name identity("/TestCommandInterest/Validation");
+  identity.appendVersion();
+
   Name certName;
   BOOST_REQUIRE_NO_THROW(certName = keyChain.createIdentity(identity));
 
@@ -84,38 +88,39 @@
   validator.validate(*commandInterest1,
   		     bind(&CommandInterestFixture::validated, this, _1),
   		     bind(&CommandInterestFixture::validationFailed, this, _1, _2));
-  
+
   BOOST_CHECK_EQUAL(m_validity, true);
-  
+
   //Test an outdated command
   reset();
   shared_ptr<Interest> commandInterest2 = make_shared<Interest>("/TestCommandInterest/Validation/Command2");
-  int64_t timestamp = time::now() / 1000000;
-  timestamp -= 5000;
+  time::milliseconds timestamp = time::toUnixTimestamp(time::system_clock::now());
+  timestamp -= time::seconds(5);
+
   Name commandName = commandInterest2->getName();
   commandName
-    .append(name::Component::fromNumber(timestamp))
-    .append(name::Component::fromNumber(random::generateWord64()));
+    .appendNumber(timestamp.count())
+    .appendNumber(random::generateWord64());
   commandInterest2->setName(commandName);
-  
+
   keyChain.signByIdentity(*commandInterest2, identity);
   validator.validate(*commandInterest2,
   		     bind(&CommandInterestFixture::validated, this, _1),
   		     bind(&CommandInterestFixture::validationFailed, this, _1, _2));
-  
+
   BOOST_CHECK_EQUAL(m_validity, false);
-  
+
   //Test an unauthorized command
   Name identity2("/TestCommandInterest/Validation2");
   Name certName2;
   BOOST_REQUIRE_NO_THROW(certName2 = keyChain.createIdentity(identity2));
-  
+
   shared_ptr<Interest> commandInterest3 = make_shared<Interest>("/TestCommandInterest/Validation/Command3");
   generator.generateWithIdentity(*commandInterest3, identity2);
   validator.validate(*commandInterest3,
   		     bind(&CommandInterestFixture::validated, this, _1),
   		     bind(&CommandInterestFixture::validationFailed, this, _1, _2));
-  
+
   BOOST_CHECK_EQUAL(m_validity, false);
 
   //Test another unauthorized command
@@ -124,7 +129,7 @@
   validator.validate(*commandInterest4,
   		     bind(&CommandInterestFixture::validated, this, _1),
   		     bind(&CommandInterestFixture::validationFailed, this, _1, _2));
-  
+
   BOOST_CHECK_EQUAL(m_validity, false);
 
   BOOST_CHECK_NO_THROW(keyChain.deleteIdentity(identity));
diff --git a/tests/security/test-validator.cpp b/tests/security/test-validator.cpp
index bf55bda..c909c06 100644
--- a/tests/security/test-validator.cpp
+++ b/tests/security/test-validator.cpp
@@ -31,7 +31,9 @@
 {
   KeyChainImpl<SecPublicInfoSqlite3, SecTpmFile> keyChain;
 
-  Name identity("/TestValidator/Null/" + boost::lexical_cast<std::string>(time::now()));
+  Name identity("/TestValidator/Null");
+  identity.appendVersion();
+
   BOOST_REQUIRE_NO_THROW(keyChain.createIdentity(identity));
 
   Name dataName = identity;
diff --git a/tests/test-data.cpp b/tests/test-data.cpp
index b5b2083..19241b5 100644
--- a/tests/test-data.cpp
+++ b/tests/test-data.cpp
@@ -118,7 +118,7 @@
 
   BOOST_REQUIRE_EQUAL(d.getName().toUri(), "/local/ndn/prefix");
   BOOST_REQUIRE_EQUAL(d.getContentType(), static_cast<uint32_t>(MetaInfo::TYPE_DEFAULT));
-  BOOST_REQUIRE_EQUAL(d.getFreshnessPeriod(), 10000);
+  BOOST_REQUIRE_EQUAL(d.getFreshnessPeriod(), time::seconds(10));
 
   BOOST_REQUIRE_EQUAL(std::string(reinterpret_cast<const char*>(d.getContent().value()), d.getContent().value_size()), "SUCCESS!");
 
@@ -143,7 +143,7 @@
   
   ndn::Data d(ndn::Name("/local/ndn/prefix"));
   d.setContentType(MetaInfo::TYPE_DEFAULT);
-  d.setFreshnessPeriod(10000);
+  d.setFreshnessPeriod(time::seconds(10));
   
   d.setContent(Content1, sizeof(Content1));
 
@@ -201,7 +201,7 @@
 {
   MetaInfo meta;
   meta.setType(MetaInfo::TYPE_DEFAULT);
-  meta.setFreshnessPeriod(10000);
+  meta.setFreshnessPeriod(time::seconds(10));
 
   BOOST_REQUIRE_NO_THROW(meta.wireEncode());
   BOOST_REQUIRE_EQUAL_COLLECTIONS(MetaInfo1, MetaInfo1+sizeof(MetaInfo1),
@@ -222,17 +222,17 @@
 {
   MetaInfo meta(Block(MetaInfo1, sizeof(MetaInfo1)));
   BOOST_CHECK_EQUAL(meta.getType(), static_cast<uint32_t>(MetaInfo::TYPE_DEFAULT));
-  BOOST_CHECK_EQUAL(meta.getFreshnessPeriod(), 10000);
+  BOOST_CHECK_EQUAL(meta.getFreshnessPeriod(), time::seconds(10));
   BOOST_CHECK_EQUAL(meta.getFinalBlockId(), name::Component());
 
   meta.wireDecode(Block(MetaInfo2, sizeof(MetaInfo2)));
   BOOST_CHECK_EQUAL(meta.getType(), static_cast<uint32_t>(MetaInfo::TYPE_DEFAULT));
-  BOOST_CHECK_EQUAL(meta.getFreshnessPeriod(), 10000);
+  BOOST_CHECK_EQUAL(meta.getFreshnessPeriod(), time::seconds(10));
   BOOST_CHECK_EQUAL(meta.getFinalBlockId(), name::Component("hello,world!"));
 
   meta.wireDecode(Block(MetaInfo3, sizeof(MetaInfo3)));
   BOOST_CHECK_EQUAL(meta.getType(), static_cast<uint32_t>(MetaInfo::TYPE_LINK));
-  BOOST_CHECK_EQUAL(meta.getFreshnessPeriod(), 10000);
+  BOOST_CHECK_EQUAL(meta.getFreshnessPeriod(), time::seconds(10));
   BOOST_CHECK_EQUAL(meta.getFinalBlockId(), name::Component("hello,world!"));
 }
 
diff --git a/tests/test-faces.cpp b/tests/test-faces.cpp
deleted file mode 100644
index 0205cb1..0000000
--- a/tests/test-faces.cpp
+++ /dev/null
@@ -1,190 +0,0 @@
-/**
- * Copyright (C) 2013 Regents of the University of California.
- * See COPYING for copyright and distribution information.
- */
-
-#include <boost/test/unit_test.hpp>
-#include "face.hpp"
-#include "util/scheduler.hpp"
-
-using namespace std;
-namespace ndn {
-
-BOOST_AUTO_TEST_SUITE(TestFaces)
-
-struct FacesFixture
-{
-  FacesFixture()
-    : dataCount(0)
-    , timeoutCount(0)
-    , regPrefixId(0)
-    , inInterestCount(0)
-    , inInterestCount2(0)
-    , regFailedCount(0)
-  {
-  }
-  
-  void
-  onData()
-  {
-    ++dataCount;
-  }
-
-  void
-  onTimeout()
-  {
-    ++timeoutCount;
-  }
-
-  void
-  onInterest(Face& face)
-  {
-    ++inInterestCount;
-
-    face.unsetInterestFilter(regPrefixId);
-  }
-
-  void
-  onInterest2(Face& face)
-  {
-    ++inInterestCount2;
-
-    face.unsetInterestFilter(regPrefixId2);
-  }
-
-  void
-  onRegFailed()
-  {
-    ++regFailedCount;
-  }
-
-  void
-  expressInterest(Face& face, const Name& name)
-  {
-    Interest i(name);
-    i.setInterestLifetime(50);
-    face.expressInterest(i,
-                         bind(&FacesFixture::onData, this),
-                         bind(&FacesFixture::onTimeout, this));
-  }
-
-  void
-  terminate(Face& face)
-  {
-    face.shutdown();
-  }
-
-  uint32_t dataCount;
-  uint32_t timeoutCount;
-
-  const RegisteredPrefixId* regPrefixId;
-  const RegisteredPrefixId* regPrefixId2;
-  uint32_t inInterestCount;
-  uint32_t inInterestCount2;
-  uint32_t regFailedCount;
-};
-
-BOOST_FIXTURE_TEST_CASE (Unix, FacesFixture)
-{
-  Face face;
-
-  face.expressInterest(Interest("/%C1.M.S.localhost/%C1.M.SRV/ndnd/KEY", 1000),
-                       ptr_lib::bind(&FacesFixture::onData, this),
-                       ptr_lib::bind(&FacesFixture::onTimeout, this));
-
-  BOOST_REQUIRE_NO_THROW(face.processEvents());
-
-  BOOST_CHECK_EQUAL(dataCount, 1);
-  BOOST_CHECK_EQUAL(timeoutCount, 0);
-
-  face.expressInterest(Interest("/localhost/non-existing/data/should/not/exist/anywhere", 50),
-                       ptr_lib::bind(&FacesFixture::onData, this),
-                       ptr_lib::bind(&FacesFixture::onTimeout, this));
-  
-  BOOST_REQUIRE_NO_THROW(face.processEvents());
-
-  BOOST_CHECK_EQUAL(dataCount, 1);
-  BOOST_CHECK_EQUAL(timeoutCount, 1);
-}
-
-BOOST_FIXTURE_TEST_CASE (Tcp, FacesFixture)
-{
-  Face face("localhost");
-
-  face.expressInterest(Interest("/%C1.M.S.localhost/%C1.M.SRV/ndnd/KEY", 1000),
-                       bind(&FacesFixture::onData, this),
-                       bind(&FacesFixture::onTimeout, this));
-
-  BOOST_REQUIRE_NO_THROW(face.processEvents());
-
-  BOOST_CHECK_EQUAL(dataCount, 1);
-  BOOST_CHECK_EQUAL(timeoutCount, 0);
-
-  face.expressInterest(Interest("/localhost/non-existing/data/should/not/exist/anywhere", 50),
-                       bind(&FacesFixture::onData, this),
-                       bind(&FacesFixture::onTimeout, this));
-
-  BOOST_REQUIRE_NO_THROW(face.processEvents());
-
-  BOOST_CHECK_EQUAL(dataCount, 1);
-  BOOST_CHECK_EQUAL(timeoutCount, 1);
-}
-
-
-BOOST_FIXTURE_TEST_CASE (SetFilter, FacesFixture)
-{
-  Face face;
-  Face face2(face.ioService());
-  Scheduler scheduler(*face.ioService());
-  scheduler.scheduleEvent(time::seconds(0.3),
-                          bind(&FacesFixture::terminate, this, func_lib::ref(face)));
-  
-  regPrefixId = face.setInterestFilter("/Hello/World",
-                                       bind(&FacesFixture::onInterest, this, func_lib::ref(face)),
-                                       bind(&FacesFixture::onRegFailed, this));
-
-  scheduler.scheduleEvent(time::seconds(0.2),
-                          bind(&FacesFixture::expressInterest, this,
-                               func_lib::ref(face2), Name("/Hello/World/!")));
-  
-  BOOST_REQUIRE_NO_THROW(face.processEvents());
-
-  BOOST_CHECK_EQUAL(regFailedCount, 0);  
-  BOOST_CHECK_EQUAL(inInterestCount, 1);  
-  BOOST_CHECK_EQUAL(timeoutCount, 1);
-  BOOST_CHECK_EQUAL(dataCount, 0);
-}
-
-BOOST_FIXTURE_TEST_CASE (SetTwoFilters, FacesFixture)
-{
-  Face face;
-  Face face2(face.ioService());
-  Scheduler scheduler(*face.ioService());
-  scheduler.scheduleEvent(time::seconds(1),
-                          bind(&FacesFixture::terminate, this, func_lib::ref(face)));
-  
-  regPrefixId = face.setInterestFilter("/Hello/World",
-                                       bind(&FacesFixture::onInterest, this, func_lib::ref(face)),
-                                       bind(&FacesFixture::onRegFailed, this));
-  
-  regPrefixId2 = face.setInterestFilter("/Los/Angeles/Lakers",
-                                       bind(&FacesFixture::onInterest2, this, func_lib::ref(face)),
-                                       bind(&FacesFixture::onRegFailed, this));
-
-
-  scheduler.scheduleEvent(time::seconds(0.2),
-                          bind(&FacesFixture::expressInterest, this,
-                               func_lib::ref(face2), Name("/Hello/World/!")));
-  
-  BOOST_REQUIRE_NO_THROW(face.processEvents());
-
-  BOOST_CHECK_EQUAL(regFailedCount, 0);  
-  BOOST_CHECK_EQUAL(inInterestCount, 1);  
-  BOOST_CHECK_EQUAL(inInterestCount2, 0);  
-  BOOST_CHECK_EQUAL(timeoutCount, 1);
-  BOOST_CHECK_EQUAL(dataCount, 0);
-}
-
-BOOST_AUTO_TEST_SUITE_END()
-
-} // namespace ndn
diff --git a/tests/test-interest.cpp b/tests/test-interest.cpp
index 0c2db34..eca8066 100644
--- a/tests/test-interest.cpp
+++ b/tests/test-interest.cpp
@@ -63,7 +63,7 @@
 
   BOOST_REQUIRE_EQUAL(i.getName().toUri(), "/local/ndn/prefix");
   BOOST_REQUIRE_EQUAL(i.getScope(), 1);
-  BOOST_REQUIRE_EQUAL(i.getInterestLifetime(), 1000);
+  BOOST_REQUIRE_EQUAL(i.getInterestLifetime(), time::milliseconds(1000));
   BOOST_REQUIRE_EQUAL(i.getMinSuffixComponents(), 1);
   BOOST_REQUIRE_EQUAL(i.getMaxSuffixComponents(), 1);
   BOOST_REQUIRE_EQUAL(i.getChildSelector(), 1);
@@ -83,7 +83,7 @@
 
   BOOST_REQUIRE_EQUAL(i.getName().toUri(), "/local/ndn/prefix");
   BOOST_REQUIRE_EQUAL(i.getScope(), 1);
-  BOOST_REQUIRE_EQUAL(i.getInterestLifetime(), 1000);
+  BOOST_REQUIRE_EQUAL(i.getInterestLifetime(), time::milliseconds(1000));
   BOOST_REQUIRE_EQUAL(i.getMinSuffixComponents(), 1);
   BOOST_REQUIRE_EQUAL(i.getMaxSuffixComponents(), 1);
   BOOST_REQUIRE_EQUAL(i.getChildSelector(), 1);
@@ -96,7 +96,7 @@
 {
   ndn::Interest i(ndn::Name("/local/ndn/prefix"));
   i.setScope(1);
-  i.setInterestLifetime(1000);
+  i.setInterestLifetime(time::milliseconds(1000));
   i.setMinSuffixComponents(1);
   i.setMaxSuffixComponents(1);
   i.setChildSelector(1);
diff --git a/tests/util/test-io.cpp b/tests/util/test-io.cpp
index acbdc38..1e8b0bd 100644
--- a/tests/util/test-io.cpp
+++ b/tests/util/test-io.cpp
@@ -16,7 +16,9 @@
 {
   KeyChainImpl<SecPublicInfoSqlite3, SecTpmFile> keychain;
 
-  Name identity("/TestIO/Basic/" + boost::lexical_cast<std::string>(time::now()));
+  Name identity("/TestIO/Basic");
+  identity.appendVersion();
+
   Name certName;
   BOOST_REQUIRE_NO_THROW(certName = keychain.createIdentity(identity));
   shared_ptr<IdentityCertificate> idCert;
diff --git a/tests/util/test-scheduler.cpp b/tests/util/test-scheduler.cpp
index 957ad98..66417da 100644
--- a/tests/util/test-scheduler.cpp
+++ b/tests/util/test-scheduler.cpp
@@ -21,7 +21,7 @@
     , count4(0)
   {
   }
-    
+
   void
   event1()
   {
@@ -47,7 +47,7 @@
   {
     ++count4;
   }
-  
+
   int count1;
   int count2;
   int count3;
@@ -56,22 +56,22 @@
 
 BOOST_FIXTURE_TEST_CASE(Events, SchedulerFixture)
 {
-  boost::asio::io_service io; 
+  boost::asio::io_service io;
 
   Scheduler scheduler(io);
-  scheduler.scheduleEvent(time::seconds(0.5), bind(&SchedulerFixture::event1, this));
-  
-  EventId i = scheduler.scheduleEvent(time::seconds(1.0), bind(&SchedulerFixture::event2, this));
+  scheduler.scheduleEvent(time::milliseconds(500), bind(&SchedulerFixture::event1, this));
+
+  EventId i = scheduler.scheduleEvent(time::seconds(1), bind(&SchedulerFixture::event2, this));
   scheduler.cancelEvent(i);
 
-  scheduler.scheduleEvent(time::seconds(0.25), bind(&SchedulerFixture::event3, this));
+  scheduler.scheduleEvent(time::milliseconds(250), bind(&SchedulerFixture::event3, this));
 
-  i = scheduler.scheduleEvent(time::seconds(0.05), bind(&SchedulerFixture::event2, this));
+  i = scheduler.scheduleEvent(time::milliseconds(50), bind(&SchedulerFixture::event2, this));
   scheduler.cancelEvent(i);
 
-  i = scheduler.schedulePeriodicEvent(time::seconds(1.5), time::seconds(0.5), bind(&SchedulerFixture::event4, this));
+  i = scheduler.schedulePeriodicEvent(time::milliseconds(1500), time::milliseconds(500), bind(&SchedulerFixture::event4, this));
   scheduler.scheduleEvent(time::seconds(4), bind(&Scheduler::cancelEvent, &scheduler, i));
-  
+
   io.run();
 
   BOOST_CHECK_EQUAL(count1, 1);
@@ -82,9 +82,9 @@
 
 BOOST_AUTO_TEST_CASE(CancelEmptyEvent)
 {
-  boost::asio::io_service io; 
+  boost::asio::io_service io;
   Scheduler scheduler(io);
-  
+
   EventId i;
   scheduler.cancelEvent(i);
 }
@@ -109,7 +109,7 @@
 
 BOOST_FIXTURE_TEST_CASE(SelfCancel, SelfCancelFixture)
 {
-  m_selfEventId = m_scheduler.scheduleEvent(time::seconds(0.1),
+  m_selfEventId = m_scheduler.scheduleEvent(time::milliseconds(100),
                                             bind(&SelfCancelFixture::cancelSelf, this));
 
   BOOST_REQUIRE_NO_THROW(m_io.run());
@@ -126,8 +126,8 @@
   void
   reschedule()
   {
-    EventId eventId = m_scheduler.scheduleEvent(time::seconds(0.1),
-                                                  bind(&SelfRescheduleFixture::reschedule, this));
+    EventId eventId = m_scheduler.scheduleEvent(time::milliseconds(100),
+                                                bind(&SelfRescheduleFixture::reschedule, this));
     m_scheduler.cancelEvent(m_selfEventId);
     m_selfEventId = eventId;
 
@@ -141,11 +141,11 @@
   reschedule2()
   {
     m_scheduler.cancelEvent(m_selfEventId);
-    
-    
+
+
     if(m_count < 5)
       {
-        m_selfEventId = m_scheduler.scheduleEvent(time::seconds(0.1),
+        m_selfEventId = m_scheduler.scheduleEvent(time::milliseconds(100),
                                                   bind(&SelfRescheduleFixture::reschedule2, this));
         m_count++;
       }
@@ -156,23 +156,23 @@
   {
     m_count++;
   }
-  
+
   void
   reschedule3()
   {
     m_scheduler.cancelEvent(m_selfEventId);
-    
-    m_scheduler.scheduleEvent(time::seconds(0.1),
+
+    m_scheduler.scheduleEvent(time::milliseconds(100),
                               bind(&SelfRescheduleFixture::doNothing, this));
-    m_scheduler.scheduleEvent(time::seconds(0.1),
+    m_scheduler.scheduleEvent(time::milliseconds(100),
                               bind(&SelfRescheduleFixture::doNothing, this));
-    m_scheduler.scheduleEvent(time::seconds(0.1),
+    m_scheduler.scheduleEvent(time::milliseconds(100),
                               bind(&SelfRescheduleFixture::doNothing, this));
-    m_scheduler.scheduleEvent(time::seconds(0.1),
+    m_scheduler.scheduleEvent(time::milliseconds(100),
                               bind(&SelfRescheduleFixture::doNothing, this));
-    m_scheduler.scheduleEvent(time::seconds(0.1),
+    m_scheduler.scheduleEvent(time::milliseconds(100),
                               bind(&SelfRescheduleFixture::doNothing, this));
-    m_scheduler.scheduleEvent(time::seconds(0.1),
+    m_scheduler.scheduleEvent(time::milliseconds(100),
                               bind(&SelfRescheduleFixture::doNothing, this));
   }
 
@@ -180,7 +180,7 @@
   Scheduler m_scheduler;
   EventId m_selfEventId;
   int m_count;
-  
+
 };
 
 BOOST_FIXTURE_TEST_CASE(Reschedule, SelfRescheduleFixture)
diff --git a/tests/util/test-time.cpp b/tests/util/test-time.cpp
index be4cc77..6351bb1 100644
--- a/tests/util/test-time.cpp
+++ b/tests/util/test-time.cpp
@@ -11,15 +11,27 @@
 
 BOOST_AUTO_TEST_SUITE(TestTime)
 
-BOOST_AUTO_TEST_CASE (Simple)
+BOOST_AUTO_TEST_CASE (SystemClock)
 {
-  MillisecondsSince1970 value = getNowMilliseconds();
-  BOOST_CHECK_GT(value, 1390966967032);
+  time::system_clock::TimePoint value = time::system_clock::now();
+  time::system_clock::TimePoint referenceTime =
+    time::fromUnixTimestamp(time::milliseconds(1390966967032));
 
-  BOOST_CHECK_EQUAL(toIsoString(1390966967032), "20140129T034247.032000");
-  BOOST_CHECK_EQUAL(fromIsoString("20140129T034247.032000"), 1390966967032);
+  BOOST_CHECK_GT(value, referenceTime);
 
-  BOOST_CHECK_EQUAL(fromIsoString("20140129T034247.032000Z"), 1390966967032);
+  BOOST_CHECK_EQUAL(time::toIsoString(referenceTime), "20140129T034247.032000");
+  BOOST_CHECK_EQUAL(time::fromIsoString("20140129T034247.032000"), referenceTime);
+
+  BOOST_CHECK_EQUAL(time::fromIsoString("20140129T034247.032000Z"), referenceTime);
+}
+
+BOOST_AUTO_TEST_CASE (SteadyClock)
+{
+  time::steady_clock::TimePoint oldValue = time::steady_clock::now();
+  usleep(100);
+  time::steady_clock::TimePoint newValue = time::steady_clock::now();
+
+  BOOST_CHECK_GT(newValue, oldValue);
 }
 
 BOOST_AUTO_TEST_SUITE_END()
