David Ribeiro Alves has uploaded a new change for review.

  http://gerrit.cloudera.org:8080/5325

Change subject: Allow to build a MonoTime from a MonoDelta
......................................................................

Allow to build a MonoTime from a MonoDelta

This allows to build a MonoTime from a timestamp representing
time since the "start". This is purposefully vague as the source
of time can the machine's monotonic clock or something else
like time since the epoch.

Because of this care should be taken to only compare MonoTime
instances from the same source.

In order to perform the transformation, first the caller transform
the timestamp to a MonoDelta to take advantage of the unit
handling methods. Then MonoTime::FromDeltaSinceTheEpoch()
can be called to get a MonoTime representing that timestamp.

Change-Id: I100e72cf4ac5cf23570e69e32a998253a63c6505
---
M src/kudu/util/monotime-test.cc
M src/kudu/util/monotime.cc
M src/kudu/util/monotime.h
3 files changed, 26 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/25/5325/1
-- 
To view, visit http://gerrit.cloudera.org:8080/5325
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I100e72cf4ac5cf23570e69e32a998253a63c6505
Gerrit-PatchSet: 1
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: David Ribeiro Alves <dral...@apache.org>

Reply via email to