Update ConsoleApplication1.cpp

simplified a bit more..
more lambdas and more state capturing there by making
measure function more generic