coderman pointed out that I was being an idiot with that map code, it should have been a prefix operator of course.
<coderman> i think c++ makes everyone feel stupid at times. esp. with the STL you get very subtle effects that make sense in hindsight, but are extremely confusing at first light.
Also, coderman suggested that gethrtime would be a good solution to the time problem. Indeed it would, if only it existed in Linux.