Example #1
0
 private static void ConvertTimeSpanMicros(ReadOnlySpan <TimeSpan> source, Span <long> destination)
 {
     for (int i = 0; i < source.Length; ++i)
     {
         destination[i] = LogicalWrite.FromTimeSpanMicros(source[i]);
     }
 }
Example #2
0
 private static void ConvertTimeSpanMicros(ReadOnlySpan <TimeSpan?> source, Span <short> defLevels, Span <long> destination, short nullLevel)
 {
     for (int i = 0, dst = 0; i < source.Length; ++i)
     {
         var value = source[i];
         if (value == null)
         {
             defLevels[i] = nullLevel;
         }
         else
         {
             destination[dst++] = LogicalWrite.FromTimeSpanMicros(value.Value);
             defLevels[i]       = (short)(nullLevel + 1);
         }
     }
 }