|
|
|
@ -39,7 +39,7 @@ class FakeDataManager { |
|
|
|
|
|
|
|
|
|
|
|
realm.beginTransaction() |
|
|
|
realm.beginTransaction() |
|
|
|
|
|
|
|
|
|
|
|
for (index in 0..numberOfSessions) { |
|
|
|
for (index in 1..numberOfSessions) { |
|
|
|
|
|
|
|
|
|
|
|
if (index % commitFrequency == 0) { |
|
|
|
if (index % commitFrequency == 0) { |
|
|
|
Timber.d("****** committing at ${index} computables...") |
|
|
|
Timber.d("****** committing at ${index} computables...") |
|
|
|
@ -54,13 +54,10 @@ class FakeDataManager { |
|
|
|
session.cgSmallBlind = bigBlind / 2.0 |
|
|
|
session.cgSmallBlind = bigBlind / 2.0 |
|
|
|
|
|
|
|
|
|
|
|
val calendar = Calendar.getInstance() |
|
|
|
val calendar = Calendar.getInstance() |
|
|
|
calendar.set( |
|
|
|
val twoDaysBetweenEachSession: Long = (2 * numberOfSessions) * 24 * 60 * 60 * 1000L // approx! |
|
|
|
(2016..2018).random(), |
|
|
|
val randomTime = calendar.time.time - (0..twoDaysBetweenEachSession).random() |
|
|
|
(0..11).random(), |
|
|
|
|
|
|
|
(0..28).random(), |
|
|
|
calendar.timeInMillis = randomTime |
|
|
|
(0..23).random(), |
|
|
|
|
|
|
|
(0..59).random() |
|
|
|
|
|
|
|
) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
val startDate = calendar.time |
|
|
|
val startDate = calendar.time |
|
|
|
calendar.add(Calendar.HOUR_OF_DAY, (2..12).random()) |
|
|
|
calendar.add(Calendar.HOUR_OF_DAY, (2..12).random()) |
|
|
|
|