Esempio n. 1
0
        private static unsafe ref TimeSpan OutAsTimeSpanF(out TimeSpanF timeSpan)
        {
#if CAN_SKIP_INIT
            Unsafe.SkipInit(out timeSpan);
#else
            timeSpan = default;
#endif
            return(ref Unsafe.As <TimeSpanF, TimeSpan>(ref timeSpan));
        }
            internal Enumerator(CoroutineState coroutineState, FrameTiming timing)
            {
                Debug.Assert(timing.IsSpecified());
                var screen = coroutineState.Screen;

                _frameObject = coroutineState.FrameObject;
                _startTime   = screen.Time + screen.FrameDelta;
                _startFrame  = screen.FrameNum + 1;
                _timingPoint = screen.TimingPoints.TimingOf(timing);
            }
Esempio n. 3
0
 public TimeSpanF Add(TimeSpanF ts) => _ts.Add(ts);
Esempio n. 4
0
 public TimeSpanF Subtract(TimeSpanF ts) => _ts.Subtract(ts);
Esempio n. 5
0
 public float Divide(TimeSpanF ts) => (float)_ts.Divide(ts);
Esempio n. 6
0
 public static bool TryParse([NotNullWhen(true)] string?input, IFormatProvider?formatProvider, out TimeSpanF result)
 {
     return(TimeSpan.TryParse(input, formatProvider, out OutAsTimeSpanF(out result)));
 }
Esempio n. 7
0
 public static bool TryParse(ReadOnlySpan <char> s, out TimeSpanF result)
 {
     return(TimeSpan.TryParse(s, out OutAsTimeSpanF(out result)));
 }
Esempio n. 8
0
        public static bool TryParseExact([NotNullWhen(true)] string?input, [NotNullWhen(true)] string?format, IFormatProvider?formatProvider, out TimeSpanF result)
        {
#if NETCOREAPP3_1
#pragma warning disable CS8604
#endif
            return(TimeSpan.TryParseExact(input, format, formatProvider, out OutAsTimeSpanF(out result)));

#if NETCOREAPP3_1
#pragma warning restore CS8604
#endif
        }
Esempio n. 9
0
 public static bool TryParseExact(ReadOnlySpan <char> input, ReadOnlySpan <char> format, IFormatProvider?formatProvider, TimeSpanStyles styles, out TimeSpanF result)
 {
     return(TimeSpan.TryParseExact(input, format, formatProvider, styles, out OutAsTimeSpanF(out result)));
 }
Esempio n. 10
0
        public static bool TryParseExact(ReadOnlySpan <char> input, [NotNullWhen(true)] string?[]?formats, IFormatProvider?formatProvider, TimeSpanStyles styles, out TimeSpanF result)
        {
#if NETCOREAPP3_1
#pragma warning disable CS8604, CS8620
#endif
            return(TimeSpan.TryParseExact(input, formats, formatProvider, styles, out OutAsTimeSpanF(out result)));

#if NETCOREAPP3_1
#pragma warning restore CS8604, CS8620
#endif
        }
Esempio n. 11
0
 public static bool TryParse(ReadOnlySpan <char> input, IFormatProvider?formatProvider, out TimeSpanF result)
 {
     return(TimeSpan.TryParse(input, formatProvider, out OutAsTimeSpanF(out result)));
 }
Esempio n. 12
0
 public static bool TryParse([NotNullWhen(true)] string?s, out TimeSpanF result)
 {
     return(TimeSpan.TryParse(s, out OutAsTimeSpanF(out result)));
 }