Repository: mesos Updated Branches: refs/heads/master ede9040e2 -> 8a01dd8d2
Added protobufs to represent time and duration with integer precision. Instead of using doubles, time and duration can be represented as integers for nanoseconds. This will be important if frameworks need to compare times to make decisions (such as for maintenance primitives). Note about the naming: * TimeInfo will directly correspond with the Time class. * DurationInfo will directly correspond with the Duration class. Review: https://reviews.apache.org/r/37655 Project: http://git-wip-us.apache.org/repos/asf/mesos/repo Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/8a01dd8d Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/8a01dd8d Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/8a01dd8d Branch: refs/heads/master Commit: 8a01dd8d2a6517d2fcf2983a436c5ce37e3666bf Parents: ede9040 Author: Joseph Wu <[email protected]> Authored: Thu Aug 27 18:28:24 2015 -0400 Committer: Joris Van Remoortere <[email protected]> Committed: Thu Aug 27 18:51:16 2015 -0400 ---------------------------------------------------------------------- include/mesos/mesos.proto | 18 ++++++++++++++++++ include/mesos/v1/mesos.proto | 18 ++++++++++++++++++ 2 files changed, 36 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/mesos/blob/8a01dd8d/include/mesos/mesos.proto ---------------------------------------------------------------------- diff --git a/include/mesos/mesos.proto b/include/mesos/mesos.proto index 715b8cf..c40a09b 100644 --- a/include/mesos/mesos.proto +++ b/include/mesos/mesos.proto @@ -94,6 +94,24 @@ message ContainerID { /** + * Represents time since the epoch, in nanoseconds. + */ +message TimeInfo { + required int64 nanoseconds = 1; + + // TODO(josephw): Add time zone information, if necessary. +} + + +/** + * Represents duration in nanoseconds. + */ +message DurationInfo { + required int64 nanoseconds = 1; +} + + +/** * A network address. * * TODO(bmahler): Use this more widely. http://git-wip-us.apache.org/repos/asf/mesos/blob/8a01dd8d/include/mesos/v1/mesos.proto ---------------------------------------------------------------------- diff --git a/include/mesos/v1/mesos.proto b/include/mesos/v1/mesos.proto index 382b978..ee15b9a 100644 --- a/include/mesos/v1/mesos.proto +++ b/include/mesos/v1/mesos.proto @@ -94,6 +94,24 @@ message ContainerID { /** + * Represents time since the epoch, in nanoseconds. + */ +message TimeInfo { + required int64 nanoseconds = 1; + + // TODO(josephw): Add time zone information, if necessary. +} + + +/** + * Represents duration in nanoseconds. + */ +message DurationInfo { + required int64 nanoseconds = 1; +} + + +/** * A network address. * * TODO(bmahler): Use this more widely.
