Fix types and docs for the global time provider class.
Add more detailed description and usage examples to the code. Fix styling issues and adjust some types for the compiler.