/**
 * Go SDK for OpenFGA
 *
 * API version: 1.x
 * Website: https://openfga.dev
 * Documentation: https://openfga.dev/docs
 * Support: https://openfga.dev/community
 * License: [Apache-2.0](https://github.com/openfga/go-sdk/blob/main/LICENSE)
 *
 * NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT.
 */

package internalutils

import (
	_math "math"
	_rand "math/rand"
)

// RandomTime provides a randomized time
func RandomTime(loopCount int, minWaitInMs int) int {
	min := int(_math.Pow(2, float64(loopCount))) * minWaitInMs
	max := int(_math.Pow(2, float64(loopCount+1))) * minWaitInMs
	return _rand.Intn(max-min+1) + min
}
