This commit is contained in:
parent
9663660519
commit
567f8a8d24
@ -16,6 +16,7 @@ fun main(args: Array<String>): Unit = io.ktor.server.tomcat.EngineMain.main(args
|
||||
fun Application.module(testing: Boolean = false) {
|
||||
runBlocking {
|
||||
var startTime: Instant
|
||||
var currTimeStamp: Instant
|
||||
var elapsed = Duration.ZERO
|
||||
val targetTime = Duration.ofSeconds(System.getenv("WAITTIME").toLong())
|
||||
var currIter = 0
|
||||
@ -29,6 +30,8 @@ fun Application.module(testing: Boolean = false) {
|
||||
while (elapsed < targetTime) {
|
||||
currIter += 1
|
||||
uploaders.add(Uploader(currIter))
|
||||
currTimeStamp = Instant.now()
|
||||
elapsed = Duration.between(startTime, currTimeStamp)
|
||||
}
|
||||
for (uploader in uploaders) {
|
||||
uploader.sendRequest()
|
||||
|
Loading…
Reference in New Issue
Block a user