Skip to content
Snippets Groups Projects
Commit a8f77c9d authored by Rainer Kartmann's avatar Rainer Kartmann
Browse files

Set timeSent in low-level commit()

parent f12abb30
No related branches found
No related tags found
No related merge requests found
......@@ -41,16 +41,9 @@ namespace armarx::armem::client
}
CommitResult Writer::commit(const Commit& _commit)
CommitResult Writer::commit(const Commit& commit)
{
ARMARX_CHECK_NOT_NULL(memory);
Commit commit = _commit;
Time timeSent = armem::Time::now();
for (EntityUpdate& update : commit.updates)
{
update.timeSent = timeSent;
}
data::Commit commitIce;
toIce(commitIce, commit);
......@@ -64,10 +57,18 @@ namespace armarx::armem::client
}
data::CommitResult Writer::commit(const data::Commit& commit)
data::CommitResult Writer::commit(const data::Commit& _commit)
{
ARMARX_CHECK_NOT_NULL(memory);
data::Commit commit = _commit;
Time timeSent = armem::Time::now();
for (data::EntityUpdate& update : commit.updates)
{
update.timeCreatedMicroSeconds = timeSent.toMicroSeconds();
}
data::CommitResult result;
auto handleError = [&commit, &result](const std::string & what)
{
......
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