How to get delta time in c++?

ACharacter actually derives from AActor so in both cases you need to override the Tick function.

https://docs.unrealengine.com/latest/INT/API/Runtime/Engine/GameFramework/AActor/Tick/1/index.html