Fix T16916 CI failures (#16966)

1. Slightly increased the waiting time for the tested effect to be more
   profound.

2. Introduced measuring of the actual time spent waiting and adjusing
   CPU time by it to compensate for threadDelay waiting time
   inconsistencies.
18 jobs for !1461 with fix/t16916-backport in 328 minutes and 51 seconds (queued for 3 seconds)
latest detached
Status Job ID Name Coverage
  Lint
passed #129408
lint
ghc-linters

00:00:20

passed #129409
lint
lint-submods-mr

00:00:21

 
  Build
failed #129412
x86_64-linux allowed to fail
release-x86_64-linux-deb9-dwarf

01:22:41

passed #129410
x86_64-linux
validate-x86_64-linux-deb8-hadrian

02:01:09

passed #129411
x86_64-linux
validate-x86_64-linux-deb9-debug

01:08:21

 
  Full Build
failed #129414
aarch64-linux allowed to fail
validate-aarch64-linux-deb9

01:00:21

passed #129415
x86_64-linux
validate-i386-linux-deb9

01:42:04

passed #129413
x86_64-darwin
validate-x86_64-darwin

00:58:32

passed #129416
x86_64-linux
validate-x86_64-linux-deb9

01:41:27

failed #129418
x86_64-linux allowed to fail
validate-x86_64-linux-deb9-integer-simple

00:39:56

passed #129417
x86_64-linux
validate-x86_64-linux-deb9-llvm

03:16:50

passed #129419
x86_64-linux
validate-x86_64-linux-deb9-unreg

03:26:28

passed #129420
x86_64-linux
validate-x86_64-linux-fedora27

01:45:24

failed #129422
x86_64-windows allowed to fail
validate-x86_64-windows

02:29:52

failed #129421
x86_64-windows allowed to fail
validate-x86_64-windows-hadrian

00:32:41

 
  Cleanup
passed #129424
x86_64-darwin
cleanup-darwin

00:00:05

passed #129423
x86_64-windows
cleanup-windows

00:00:52

 
  Hackage
manual #129425
x86_64-linux allowed to fail manual
hackage
 
Name Stage Failure
failed
validate-x86_64-windows Full Build
junit.xml: found 1 matching files                  
WARNING: Failed to load system CertPool:crypto/x509: system root pool is not available on Windows
Uploading artifacts to coordinator... ok
id=129422 responseStatus=201 Created token=12eaexxH
Uploading artifacts...
Runtime platform
arch=amd64 os=windows pid=6500 revision=1f513601 version=11.10.1
junit.xml: found 1 matching files

WARNING: Failed to load system CertPool:crypto/x509: system root pool is not available on Windows
Uploading artifacts to coordinator... ok
id=129422 responseStatus=201 Created token=12eaexxH
ERROR: Job failed: exit status 2
failed
release-x86_64-linux-deb9-dwarf Build
$ cp -Rf $HOME/.cabal cabal-cache
Uploading artifacts...
ghc-*.tar.xz: found 1 matching files
junit.xml: found 1 matching files

Uploading artifacts to coordinator... ok
id=129412 responseStatus=201 Created token=RJVT8s4-
Uploading artifacts...
junit.xml: found 1 matching files

Uploading artifacts to coordinator... ok
id=129412 responseStatus=201 Created token=RJVT8s4-
ERROR: Job failed: exit code 1
failed
validate-x86_64-windows-hadrian Full Build
   Speed :            16651664 Bytes/sec.
Speed : 952.815 MegaBytes/min.
Ended : Tuesday, July 23, 2019 10:04:00 AM

Uploading artifacts...
Runtime platform arch=amd64 os=windows pid=5524 revision=1f513601 version=11.10.1
WARNING: ghc.tar.xz: no matching files
ERROR: No files to upload
ERROR: Job failed: exit status 1
failed
validate-x86_64-linux-deb9-integer-simple Full Build
make[1]: *** Waiting for unfinished jobs....
make: *** [all] Error 2
Makefile:123: recipe for target 'all' failed
Running after script...
$ cp -Rf $HOME/.cabal cabal-cache
Uploading artifacts...
WARNING: junit.xml: no matching files
ERROR: No files to upload
ERROR: Job failed: exit code 1
failed
validate-aarch64-linux-deb9 Full Build
$ cp -Rf $HOME/.cabal cabal-cache
Uploading artifacts...
WARNING: ghc-*.tar.xz: no matching files
WARNING: junit.xml: no matching files
ERROR: No files to upload
Uploading artifacts...
WARNING: junit.xml: no matching files
ERROR: No files to upload
ERROR: Job failed: exit code 1