AcManager.Tools.Profile.LapTimesStorage.Unpack C# (CSharp) Method

Unpack() private method

private Unpack ( string packed, System.DateTime &date, System.TimeSpan &lapTime ) : bool
packed string
date System.DateTime
lapTime System.TimeSpan
return bool
        private bool Unpack(string packed, out DateTime date, out TimeSpan lapTime) {
            long timestamp, milliseconds;
            var s = packed?.Split(';');
            if (s?.Length == 2 && long.TryParse(s[0], out timestamp) && long.TryParse(s[1], out milliseconds)) {
                date = timestamp.ToDateTime();
                lapTime = TimeSpan.FromMilliseconds(milliseconds);
                return true;
            }

            date = default(DateTime);
            lapTime = default(TimeSpan);
            return false;
        }