Ejemplo n.º 1
0
        public ISystemClock(SystemClockType ClockType)
        {
            m_Commands = new Dictionary <int, ServiceProcessRequest>()
            {
                { 0, GetCurrentTime }
            };

            this.ClockType = ClockType;
        }
Ejemplo n.º 2
0
        public ISystemClock(SystemClockType clockType)
        {
            _clockType = clockType;
            _systemClockContextEpoch  = System.Diagnostics.Process.GetCurrentProcess().StartTime;
            _systemClockContextEnding = new byte[0x10];
            _timeOffset = 0;

            if (clockType == SystemClockType.User ||
                clockType == SystemClockType.Network)
            {
                _systemClockContextEpoch = _systemClockContextEpoch.ToUniversalTime();
            }

            _systemClockTimePoint = (long)(_systemClockContextEpoch - Epoch).TotalSeconds;
        }
Ejemplo n.º 3
0
        public ISystemClock(SystemClockType ClockType)
        {
            m_Commands = new Dictionary <int, ServiceProcessRequest>()
            {
                { 0, GetCurrentTime },
                { 1, SetCurrentTime },
                { 2, GetSystemClockContext },
                { 3, SetSystemClockContext }
            };

            this.ClockType           = ClockType;
            SystemClockContextEpoch  = System.Diagnostics.Process.GetCurrentProcess().StartTime;
            SystemClockContextEnding = new byte[0x10];
            TimeOffset = 0;

            if (ClockType == SystemClockType.User ||
                ClockType == SystemClockType.Network)
            {
                SystemClockContextEpoch = SystemClockContextEpoch.ToUniversalTime();
            }

            SystemClockTimePoint = (long)(SystemClockContextEpoch - Epoch).TotalSeconds;
        }
Ejemplo n.º 4
0
        public ISystemClock(SystemClockType clockType)
        {
            _commands = new Dictionary <int, ServiceProcessRequest>
            {
                { 0, GetCurrentTime },
                { 1, SetCurrentTime },
                { 2, GetSystemClockContext },
                { 3, SetSystemClockContext }
            };

            _clockType = clockType;
            _systemClockContextEpoch  = System.Diagnostics.Process.GetCurrentProcess().StartTime;
            _systemClockContextEnding = new byte[0x10];
            _timeOffset = 0;

            if (clockType == SystemClockType.User ||
                clockType == SystemClockType.Network)
            {
                _systemClockContextEpoch = _systemClockContextEpoch.ToUniversalTime();
            }

            _systemClockTimePoint = (long)(_systemClockContextEpoch - Epoch).TotalSeconds;
        }