예제 #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);
            }
예제 #3
0
 public TimeSpanF Add(TimeSpanF ts) => _ts.Add(ts);
예제 #4
0
 public TimeSpanF Subtract(TimeSpanF ts) => _ts.Subtract(ts);
예제 #5
0
 public float Divide(TimeSpanF ts) => (float)_ts.Divide(ts);
예제 #6
0
 public static bool TryParse([NotNullWhen(true)] string?input, IFormatProvider?formatProvider, out TimeSpanF result)
 {
     return(TimeSpan.TryParse(input, formatProvider, out OutAsTimeSpanF(out result)));
 }
예제 #7
0
 public static bool TryParse(ReadOnlySpan <char> s, out TimeSpanF result)
 {
     return(TimeSpan.TryParse(s, out OutAsTimeSpanF(out result)));
 }
예제 #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
        }
예제 #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)));
 }
예제 #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
        }
예제 #11
0
 public static bool TryParse(ReadOnlySpan <char> input, IFormatProvider?formatProvider, out TimeSpanF result)
 {
     return(TimeSpan.TryParse(input, formatProvider, out OutAsTimeSpanF(out result)));
 }
예제 #12
0
 public static bool TryParse([NotNullWhen(true)] string?s, out TimeSpanF result)
 {
     return(TimeSpan.TryParse(s, out OutAsTimeSpanF(out result)));
 }