getTime refactoring

Some refactoring of getTime() functions.
On the other hand it'd be obvious that OS specific variants are used