#include double timeIt(void (*fun)()) { double timeh = GetTickCount(); fun(); return (GetTickCount() - timeh)/1000.; }