you can use multiset with predicat to compare message time