// Collection of code snippets by Arne Vajhøj 
// (likely posted to comp.os.vms/INFO-VAX, INFO-TPU, MACRO32, eksperten.dk, newz.dk, LinkedIn or other place sometime between 1990 and now) 
#include <iostream>
#include <ctime>

using namespace std;

class Thing
{
    public:
        virtual void method() = 0;
};

class DerivedThing : public Thing
{
    public:
        virtual void method() { };
};

const int N = 1000000000;

int main()
{
    Thing *t = new DerivedThing();
    clock_t t1 = clock();
    for(__int64 i = 0; i < N; i++)
    {
        t->method();
    }
    clock_t t2 = clock();
    cout << (t2 - t1)*1.0/CLOCKS_PER_SEC << endl;
}
