How long should I wait?

Okay so I am 22 I am going through a breakup it was a more long term relationship but we decided to go out separate ways because we are at different places in our lives he could feel something was off and I told him everything I was holding back on. this is the most peaceful breakup I have ever gone through which is so nice because I never wanted to hurt him and I wanted to deal with this with integrity and respect and it just feels like the right thing… for both of us… but.. my best friend just confessed his love for me the other day (a few days after the breakup) it melted my heart and I have had feelings for him for a while which was part of why I broke up with my ex but I told him I shared his feelings but I need some time before I can commit to anything out of respect for my ex and for myself to allow myself to heal and to grow as a person… he has been extremely respectful and has helped me through so much and helped me to grow and heal from my past and I absolutely adore him he is such a good person…

so my questions are…

#1 am I being a piece of shit? To either my ex or my best friend

#2 how long should I wait before I pursue a relationship with my best friend? Because I don’t want to string him along (or however you say it) and I don’t want him to be a rebound because I don’t want to hurt him.. and I want to make sure I have healed enough from the breakup before anything happens… if it happens and I want to do everything the right way with integrity and respect for myself and my best friend

Idk if that makes sense but what do you think?