while only runs if its true
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
89504a99ca
commit
d81339b851
@ -17,7 +17,7 @@ fun Application.module(testing: Boolean = false) {
|
||||
runBlocking {
|
||||
val cachedFile = File("/app/wave.wav").readBytes()
|
||||
val gson = GsonBuilder().setPrettyPrinting().create()
|
||||
val startTime = Instant.now()
|
||||
var startTime : Instant
|
||||
var elapsed = Duration.ofSeconds(0)
|
||||
val targetTime = Duration.ofSeconds(System.getenv("WAITTIME").toLong())
|
||||
var currIter = 1
|
||||
@ -29,7 +29,8 @@ fun Application.module(testing: Boolean = false) {
|
||||
val job = GlobalScope.launch {
|
||||
delay(3000L)
|
||||
println("Starting benchmark")
|
||||
while(elapsed > targetTime){
|
||||
startTime = Instant.now()
|
||||
while(elapsed < targetTime){
|
||||
println(currIter)
|
||||
uploader.uploadData(currIter, gson, cachedFile)
|
||||
currIter+=1
|
||||
|
Loading…
Reference in New Issue
Block a user