I want to create a map with a high resolution timestamp key and two other items. So I thought something like that:
std::map<time_t,std::pair<long,int>> someContainer; //(time_t will be replaced)
1) I need a timestamp type which is nanosecond resolution, I saw boost::chrono::high_resolution_clock
but I don't think it will give nanosecond resolution, and if it is can I use it as a type inside a map?
2) How to add a new item to this map? As far as I know insert
does not take 3 parameters. I don't know the right syntax for this operation.
3) I have to perform a very fast search via the key (which is timestamp in my case) so std::map
is the right container for this purpose?
By the way I am working in Visual Studio 2008, Visual C++ in a Win 7 x64 computer...
Thanks indeed...