[RFC] Implement startuptime functions on top of profiling functions

Another notch in the belt of reducing our dependence on `gettimeofday`, which is not present on Windows. It's also a nice cleanup.

Ping @equalsraf.