There are basically two ways to get the time in Bitcoin Core:
- get the system time (via
GetSystemTimeInSecondsorGetTime{Millis,Micros}) - get the mockable time (via
GetTime)
Both return the same type (a plain int). This can lead to (test-only) bugs such as 99464bc38e9575ff47f8e33223b252dcea2055e3.
Fix that by deprecating GetTime and adding a GetTime<> that returns the mockable time in a non-int type. The new util function is currently unused, but new code should it where possible.