Improving fake sessions content

feature/top10
Laurent 7 years ago
parent e319a4e374
commit 2ffe7968be
  1. 13
      app/src/main/java/net/pokeranalytics/android/util/FakeDataManager.kt

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

Loading…
Cancel
Save