Skip to content
Snippets Groups Projects
Commit 7527c184 authored by Cedric CAFFY's avatar Cedric CAFFY
Browse files

Removed TID of the name of object addresses

Added microseconds after the creation time of the object (Agent Reference)
parent 68d5e609
No related branches found
No related tags found
No related merge requests found
......@@ -25,6 +25,7 @@
#include <sstream>
#include <unistd.h>
#include <sys/syscall.h>
#include <sys/time.h>
#include <iomanip>
namespace cta { namespace objectstore {
......@@ -36,7 +37,9 @@ m_logger(logger) {
m_nextId=0;
std::stringstream aid;
// Get time
time_t now = time(0);
struct timeval tv;
::gettimeofday(&tv,NULL);
time_t now = tv.tv_sec;
struct tm localNow;
localtime_r(&now, &localNow);
// Get hostname
......@@ -52,7 +55,8 @@ m_logger(logger) {
<< std::setw(2) << localNow.tm_mday << "-"
<< std::setw(2) << localNow.tm_hour << ":"
<< std::setw(2) << localNow.tm_min << ":"
<< std::setw(2) << localNow.tm_sec << "-"
<< std::setw(2) << localNow.tm_sec << ":"
<< tv.tv_usec << "-"
<< id;
m_agentAddress = aid.str();
// Initialize the serialization token for queued actions (lock will make helgrind
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment