Skip to content

Commit 3b17b5f

Browse files
committed
use unity random
1 parent 05c3ed6 commit 3b17b5f

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

Runtime/Aptabase.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ public static class Aptabase
1717
private static string _baseURL;
1818

1919
private static readonly TimeSpan _sessionTimeout = TimeSpan.FromMinutes(60);
20-
private static readonly Random _random = new();
2120
private static readonly Dictionary<string, string> _hosts = new()
2221
{
2322
{ "US", "https://us.aptabase.com" },
@@ -169,7 +168,7 @@ private static int GetFlushInterval()
169168
public static string NewSessionId()
170169
{
171170
var epochInSeconds = DateTimeOffset.UtcNow.ToUnixTimeSeconds();
172-
var random = _random.NextInt64(0, 99999999);
171+
var random = Random.Range(0, 99999999);
173172
return (epochInSeconds * 100000000 + random).ToString();
174173
}
175174
}

0 commit comments

Comments
 (0)