Sha256: bdfea875e26721e83fa9b94fe1cf52d4bc646e867d8b4bca6d34e7885c7d9cc3
Contents?: true
Size: 1.02 KB
Versions: 16
Compression:
Stored size: 1.02 KB
Contents
# Copyright (c) 2022 Contrast Security, Inc. See https://www.contrastsecurity.com/enduser-terms-0317a for more details. # frozen_string_literal: true require 'contrast/agent/reporting/reporting_events/reporting_event' require 'contrast/utils/timer' module Contrast module Agent module Reporting # This is the new ServerReportingEvent class which will include all the needed and mutual information for those # events which correspond to Servers, such as Servers Activity. # # @abstract class ServerReportingEvent < Contrast::Agent::Reporting::ReportingEvent protected # The timestamp field is a bit of a misnomer. It's really the time, in ms, since the settings for this # application have been updated. If I've never updated, then it's been 0ms since then. # # @return [Integer] def since_last_update (update_time = Contrast::SETTINGS.last_server_update_ms) ? Contrast::Utils::Timer.now_ms - update_time : 0 end end end end end
Version data entries
16 entries across 16 versions & 1 rubygems