GetTimerStart() public static method

public static GetTimerStart ( ) : System.TimeSpan
return System.TimeSpan
Ejemplo n.º 1
0
        private void InitInternal(AdjustConfig adjustConfig, DeviceUtil deviceUtil)
        {
            Init(adjustConfig, deviceUtil);
            DeviceInfo           = DeviceUtil.GetDeviceInfo();
            DeviceInfo.SdkPrefix = adjustConfig.SdkPrefix;

            TimerInterval      = AdjustFactory.GetTimerInterval();
            TimerStart         = AdjustFactory.GetTimerStart();
            SessionInterval    = AdjustFactory.GetSessionInterval();
            SubsessionInterval = AdjustFactory.GetSubsessionInterval();

            if (AdjustConfig.Environment.Equals(AdjustConfig.EnvironmentProduction))
            {
                // suppress all logs in production
                Logger.LogLevel = LogLevel.Suppress;
            }

            if (AdjustConfig.EventBufferingEnabled)
            {
                Logger.Info("Event buffering is enabled");
            }

            if (AdjustConfig.DefaultTracker != null)
            {
                Logger.Info("Default tracker: '{0}'", AdjustConfig.DefaultTracker);
            }

            ReadAttribution();
            ReadActivityState();

            PackageHandler = AdjustFactory.GetPackageHandler(this, Paused());

            var attributionPackage = GetAttributionPackage();

            AttributionHandler = AdjustFactory.GetAttributionHandler(this,
                                                                     attributionPackage,
                                                                     Paused(),
                                                                     AdjustConfig.HasDelegate);

            Timer = new TimerCycle(InternalQueue, TimerFiredInternal, timeInterval: TimerInterval, timeStart: TimerStart);

            StartInternal();
        }