PolicyManager: Add a variable to tell when the Updater was started.
This patch adds a new const variable stating when was the updater
started in wallclock time. This value is required to schedule an
update check shortly after the update_engine starts, but use a
higher interval after the first update check.
BUG=chromium:358269
TEST=Added unittest.
Change-Id: Ife04c280207b5ccbf3a4a7828593cf01d1551a00
Reviewed-on: https://chromium-review.googlesource.com/197200
Reviewed-by: Alex Deymo <deymo@chromium.org>
Tested-by: Alex Deymo <deymo@chromium.org>
Commit-Queue: Alex Deymo <deymo@chromium.org>
diff --git a/policy_manager/updater_provider.h b/policy_manager/updater_provider.h
index 85074f6..f9a4bff 100644
--- a/policy_manager/updater_provider.h
+++ b/policy_manager/updater_provider.h
@@ -31,6 +31,10 @@
public:
virtual ~UpdaterProvider() {}
+ // A variable returning the timestamp when the update engine was started in
+ // wallclock time.
+ virtual Variable<base::Time>* var_updater_started_time() = 0;
+
// A variable returning the last update check time.
virtual Variable<base::Time>* var_last_checked_time() = 0;