[glib] Use clock_nanosleep if available (#15443)
commitc449308f8bd1c83131b6613711797533504d0c24
authorVlad Brezae <brezaevlad@gmail.com>
Fri, 19 Jul 2019 07:21:21 +0000 (19 10:21 +0300)
committerGitHub <noreply@github.com>
Fri, 19 Jul 2019 07:21:21 +0000 (19 10:21 +0300)
treecabb39eb9dd7c35917d2e021b2af2c722e767bc9
parenta37ad98b470381950c876bb0928cab57fe8156b2
[glib] Use clock_nanosleep if available (#15443)

According to the manual, it is recommended to use clock_nanosleep instead of nanosleep when the sleep can be repeatedly interrupted by signals and resumed. The remaining sleep interval was greater than the original timespec.

Fixes random timeouts of finalizer-abort.exe
mono/eglib/gdate-unix.c