diff options
Diffstat (limited to 'src/core/telemetry_session.cpp')
| -rw-r--r-- | src/core/telemetry_session.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/core/telemetry_session.cpp b/src/core/telemetry_session.cpp index 1ba0a698d..70eff4340 100644 --- a/src/core/telemetry_session.cpp +++ b/src/core/telemetry_session.cpp | |||
| @@ -6,13 +6,19 @@ | |||
| 6 | 6 | ||
| 7 | #include "common/scm_rev.h" | 7 | #include "common/scm_rev.h" |
| 8 | #include "core/telemetry_session.h" | 8 | #include "core/telemetry_session.h" |
| 9 | #include "web_services/telemetry_json.h" | 9 | |
| 10 | #ifdef ENABLE_WEB_SERVICE | ||
| 11 | #include "web_service/telemetry_json.h" | ||
| 12 | #endif | ||
| 10 | 13 | ||
| 11 | namespace Core { | 14 | namespace Core { |
| 12 | 15 | ||
| 13 | TelemetrySession::TelemetrySession() { | 16 | TelemetrySession::TelemetrySession() { |
| 17 | #ifdef ENABLE_WEB_SERVICE | ||
| 14 | backend = std::make_unique<WebService::TelemetryJson>(); | 18 | backend = std::make_unique<WebService::TelemetryJson>(); |
| 15 | 19 | #else | |
| 20 | backend = std::make_unique<Telemetry::NullVisitor>(); | ||
| 21 | #endif | ||
| 16 | // Log one-time session start information | 22 | // Log one-time session start information |
| 17 | const auto duration{std::chrono::steady_clock::now().time_since_epoch()}; | 23 | const auto duration{std::chrono::steady_clock::now().time_since_epoch()}; |
| 18 | const auto start_time{std::chrono::duration_cast<std::chrono::microseconds>(duration).count()}; | 24 | const auto start_time{std::chrono::duration_cast<std::chrono::microseconds>(duration).count()}; |