use glib time functions instead of posix
Simplifies time calculations and should fix compiling with musl without dropping -std=c11 #1 (closed), #2 (closed).
Simplifies time calculations and should fix compiling with musl without dropping -std=c11 #1 (closed), #2 (closed).