It can take me around six months to finally accept someone as a real friend to me and not someone who just goes to me to talk if they're bored or I'm the last person available.
Of course, I have been betrayed from time to time, but I don't let those moments pull me down. As the famous saying goes, "You never understand how valuable something is until you've lost it".
As for how I "tell" if someone likes me as a friend back, well, I honestly can never be 100% sure. But I do run a few tests to see if they're willing to like me beyond my interests, occupation, and my mistakes. I also give my care and love out to whomever I'm new with while I wait to see if they give that love back. If all goes according to this plan, then I feel I've made a friend.