fixed seqid test, added timestamp extraction
.NET Test / .NET tests (push) Successful in 1m55s

This commit is contained in:
2026-07-10 22:06:37 +04:00
parent 566c813e8d
commit 8e961352d2
4 changed files with 188 additions and 7 deletions
+3 -3
View File
@@ -48,7 +48,7 @@ public sealed class SeqId(DateTime epoch)
/// <param name="entropy">Entropy quality (default: Strong)</param>
/// <returns>64-bit sequential ID with random component</returns>
/// <exception cref="IndexOutOfRangeException">
/// Thrown if more than 255 IDs generated in 1ms
/// Thrown if more than 256 IDs generated in 1ms
/// </exception>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static long NextId(RngEntropy entropy = RngEntropy.Strong) => Default.Next(entropy);
@@ -70,7 +70,7 @@ public sealed class SeqId(DateTime epoch)
/// <param name="entropy">Entropy quality (default: Strong)</param>
/// <returns>64-bit sequential ID with random component</returns>
/// <exception cref="IndexOutOfRangeException">
/// Thrown if more than 255 IDs generated in 1ms
/// Thrown if more than 256 IDs generated in 1ms
/// </exception>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public long Next(RngEntropy entropy = RngEntropy.Strong) => Next(_defaultTimeFactory(), entropy);
@@ -85,7 +85,7 @@ public sealed class SeqId(DateTime epoch)
/// Thrown if <paramref name="dateTime"/> is earlier than last used timestamp
/// </exception>
/// <exception cref="IndexOutOfRangeException">
/// Thrown if more than 255 IDs generated in 1ms
/// Thrown if more than 256 IDs generated in 1ms
/// </exception>
public long Next(DateTime dateTime, RngEntropy entropy = RngEntropy.Strong)
{