diff options
author | Alex Vakulenko <avakulenko@google.com> | 2015-12-11 17:18:21 -0800 |
---|---|---|
committer | Vitaly Buka <vitalybuka@google.com> | 2015-12-12 01:30:28 +0000 |
commit | 532140dbb2ab861d693419b69d3ce90140fee043 (patch) | |
tree | 9430a2990cffc8118760172b04cfcf311e592355 /src/privet/privet_handler.h | |
parent | b3de3512f0276c7af73b3f2de0637c423d459f2e (diff) | |
download | libweave-532140dbb2ab861d693419b69d3ce90140fee043.tar.gz |
Add 'timeMs' field to /privet/info local API
Added the local device time field to the Info response. The timestamp
is a time in milliseconds since Epoch (similar to how the time is
used with the cloud server).
BUG: 26160070
Change-Id: I3059f2880dc2aa4c1990bbe662e8c1057b1aadc1
Reviewed-on: https://weave-review.googlesource.com/1922
Reviewed-by: Vitaly Buka <vitalybuka@google.com>
Diffstat (limited to 'src/privet/privet_handler.h')
-rw-r--r-- | src/privet/privet_handler.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/privet/privet_handler.h b/src/privet/privet_handler.h index fc024d1..5241233 100644 --- a/src/privet/privet_handler.h +++ b/src/privet/privet_handler.h @@ -12,6 +12,7 @@ #include <base/macros.h> #include <base/memory/weak_ptr.h> #include <base/scoped_observer.h> +#include <base/time/default_clock.h> #include "src/privet/cloud_delegate.h" @@ -42,7 +43,8 @@ class PrivetHandler : public CloudDelegate::Observer { PrivetHandler(CloudDelegate* cloud, DeviceDelegate* device, SecurityDelegate* pairing, - WifiDelegate* wifi); + WifiDelegate* wifi, + base::Clock* clock = nullptr); ~PrivetHandler() override; void OnTraitDefsChanged() override; @@ -134,6 +136,8 @@ class PrivetHandler : public CloudDelegate::Observer { DeviceDelegate* device_{nullptr}; SecurityDelegate* security_{nullptr}; WifiDelegate* wifi_{nullptr}; + base::DefaultClock default_clock_; + base::Clock* clock_{nullptr}; struct HandlerParameters { ApiHandler handler; |