Commit 38e1bab1 authored by Pavel Vainerman's avatar Pavel Vainerman

(SharedMemory): избавился от забытого gettimeofday

parent 42bbd46a
......@@ -791,8 +791,8 @@ void SharedMemory::checkFuse( std::shared_ptr<USensorInfo>& usi, IOController* )
{
sminfo << myname << "(updateHistory): HISTORY EVENT for " << (*it) << endl;
it->fuse_sec = sm_tv_sec;
it->fuse_usec = sm_tv_nsec;
it->fuse_tm.tv_sec = sm_tv_sec;
it->fuse_tm.tv_nsec = sm_tv_nsec;
m_historySignal.emit( (*it) );
}
}
......@@ -810,8 +810,8 @@ void SharedMemory::checkFuse( std::shared_ptr<USensorInfo>& usi, IOController* )
{
sminfo << myname << "(updateHistory): HISTORY EVENT for " << (*it) << endl;
it->fuse_sec = sm_tv_sec;
it->fuse_usec = sm_tv_nsec;
it->fuse_tm.tv_sec = sm_tv_sec;
it->fuse_tm.tv_nsec = sm_tv_nsec;
m_historySignal.emit( (*it) );
}
}
......@@ -821,8 +821,8 @@ void SharedMemory::checkFuse( std::shared_ptr<USensorInfo>& usi, IOController* )
{
sminfo << myname << "(updateHistory): HISTORY EVENT for " << (*it) << endl;
it->fuse_sec = sm_tv_sec;
it->fuse_usec = sm_tv_nsec;
it->fuse_tm.tv_sec = sm_tv_sec;
it->fuse_tm.tv_nsec = sm_tv_nsec;
m_historySignal.emit( (*it) );
}
}
......
......@@ -354,13 +354,9 @@ class SharedMemory:
id(0),
size(0), filter(""),
fuse_id(UniSetTypes::DefaultObjectId),
fuse_invert(false), fuse_use_val(false), fuse_val(0),
fuse_sec(0), fuse_usec(0)
fuse_invert(false), fuse_use_val(false), fuse_val(0)
{
struct timeval tv;
gettimeofday(&tv, NULL);
fuse_sec = tv.tv_sec;
fuse_usec = tv.tv_usec;
::clock_gettime(CLOCK_REALTIME, &fuse_tm);
}
long id; // ID
......@@ -372,8 +368,7 @@ class SharedMemory:
bool fuse_use_val;
long fuse_val;
// timestamp
long fuse_sec;
long fuse_usec;
timespec fuse_tm;
};
friend std::ostream& operator<<( std::ostream& os, const HistoryInfo& h );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment