Broken timer code, how to fix?

I’m trying to create a timer script that constantly counts down. However, whenever I run it, the entire Unity editor crashes and freezes. I’ve managed to isolate the code that is causing the problem:

    public void BombCountdown()
    {
        float BombTimer = RoundGenerator.Time; // Set a temporary bomb timer variable clone 
        while (BombTimer != 0) // While the bomb timer is still ticking
        {
            BombTimer -= Time.deltaTime; // Decrease the bomb timer count by 1 second per second
            Display.text = (Mathf.Round(BombTimer * 10) / 10).ToString("1f"); // Set the display to count in increments of 1/10
            if (PlayerController.fallOver) //If the player fell over the bridge
            {
                break; // Stop counting down
            }
        }

    }

Any way to fix this and make it work normally (i.e. not crash when run)?
ALSO: Is there any way to make the timer always show the 10ths decimal place? ToString(“1F”) only seems to simplify to the 10ths decimal point, not force it.

Your code monopolize all the CPU until BombTime is exactly 0, you should try with coroutine, so unity can continue to run. And check BombTime > 0 otherwise you probably fall into an infinite loop

	void BombCountdown()
    {
         StartCoroutine(BombCountdownCoroutine());
    }

    IEnumerator BombCountdownCoroutine()
    {
        float BombTimer = RoundGenerator.Time;
        while(BombTimer > 0 && !PlayerController.fallOver)
        {
            Display.text = (Mathf.Round(BombTimer * 10) / 10).ToString("1f");
            yield return new WaitForEndOfFrame();
            BombTimer -= Time.deltaTime;
        }
    }