I'd like to be able to get number of nanoseconds it takes to do something in my C++ program.
Object creation, time for a function to do it's thing etc.
In Java, we'd do something along the lines of:
    long now = System.currentTimeMillis();
    // stuff
    long diff = (System.currentTimeMillis() - now);
How would you do the same in C++?
 
     
     
     
     
     
    