float to ulong I want to save time player.

I (internetConnected) {
Get time now from server (ulong.)
} else {
Time in game + time at start game
When start game it’s get server time and save (ulong).
I want to fix this!!
}

I want to get time in game. I use function Time.realtimeSinceStart. It return float.

I can’t convert float to ulong. I try to convert float to ulong.

float timeInGame = Time.realtimeSinceStart.
ulong timeUlong = (ulong) timeInGame.

if timeInGame 5 when convert to ulong it’s return 5.

Just store the time in a variable on start or awake and when you want to know how long has passed, get the time again and subtract it from the start time. You can do that without the internet time if you wish.