[Android] Do Something while paused/gone.

Hey, this is my code

    int currentTime;
    int oldTime;
    int timeAway;

 public void OnApplicationPause(bool paused)
    {
        if(paused) // When Paused
        {
            oldTime = DateTime.Now.Second;
            PlayerPrefs.SetInt("oT", oldTime);
        }
        else // When Focused
        {
            currentTime = DateTime.Now.Second;
            PlayerPrefs.SetInt("cT", currentTime);

            currentTime = PlayerPrefs.GetInt("cT");
            oldTime = PlayerPrefs.GetInt("oT");

            timeAway = oldTime - currenTime;
            Debug.Log("You were away for: " + timeAway);
        }
    }

What I’m trying to do is, whenever the player is away it gets the time he/she was gone, and get the time he gets back on, subtract the value’s and get the timeAway, but when the game starts is shows the time already(bc its Focused on the game). After I pause the game on Unity, I wait like 10 seconds. and get back on. I don’t get the debug.log’s… :confused: help?

DateTime currentTime;
DateTime oldTime;
TimeSpan timeAway;

	public void OnApplicationPause(bool paused)
	{
		
		if(paused) // When Paused
		{
			oldTime = DateTime.Now;
			//PlayerPrefs.SetInt("oT", oldTime);
		}
		else // When Focused
		{
			currentTime = DateTime.Now;
			//PlayerPrefs.SetInt("cT", currentTime);

			//currentTime = PlayerPrefs.GetInt("cT");
			//oldTime = PlayerPrefs.GetInt("oT");

			timeAway = currentTime.Subtract(oldTime);
			Debug.Log("You were away for: " + TimeSpan.FromTicks(timeAway.Ticks).TotalSeconds);
		}
	}