If you specifically want to use a timestamp, then you could try getting the time from a Date object, then use that as the key when storing your value. When you write to Firebase it automatically sorts the items in a branch by their key.
Also, if you have children in Firebase that themselves have multiple children, you can use OrderByChild() to order what you read by a specific child. The link below is to some documentation that has the orderByChild() method listed.
https://firebase.google.com/docs/reference/js/firebase.database.Reference#orderbychild
I also answered this in the Spring2019 Q&A, but I also wanted to put this here in case anyone needed this, but don't see it in the 2019 one.