Skip to content

Commit

Permalink
RandomBg: randomize time too
Browse files Browse the repository at this point in the history
  • Loading branch information
MilosKozak committed Dec 6, 2024
1 parent 25056b5 commit 76d5c87
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ class RandomBgPlugin @Inject constructor(
cal[Calendar.MINUTE] -= cal[Calendar.MINUTE] % interval.toInt()
val glucoseValues = mutableListOf<GV>()
glucoseValues += GV(
timestamp = cal.timeInMillis,
timestamp = cal.timeInMillis - T.secs(40).msecs() + SecureRandom().nextInt(T.secs(40).msecs().toInt()),
value = bgMgdl,
raw = 0.0,
noise = null,
Expand Down

0 comments on commit 76d5c87

Please sign in to comment.