blob: 53df6e1500e9dcfe6c3bcb0013e560f14e643d45 [file] [log] [blame]
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil -*- */
/**
* Copyright (C) 2013 Regents of the University of California.
* @author: Jeff Thompson <jefft0@remap.ucla.edu>
* See COPYING for copyright and distribution information.
*/
#include <sstream>
#include <ndn-cpp-dev/common.hpp>
#include "util/time.hpp"
using namespace std;
namespace ndn {
string
toHex(const vector<uint8_t>& array)
{
if (!&array)
return "";
ostringstream result;
result.flags(ios::hex | ios::uppercase);
for (size_t i = 0; i < array.size(); ++i) {
uint8_t x = array[i];
if (x < 16)
result << '0';
result << (unsigned int)x;
}
return result.str();
}
MillisecondsSince1970
getNow()
{
return getNowMilliseconds();
}
}