// ********** FacadeDemo.cpp ********** #include #include using namespace std; class X { public: void operationX() {} }; class Y { public: void operationY() {} }; class Z { public: void operationZ() {} }; class Facade { private: X* x; Y* y; Z* z; public: Facade() { x = new X(); y = new Y(); z = new Z(); } void operationFacade() { x->operationX(); y->operationY(); z->operationZ(); } }; const int MAX = 2000; int main() { hrtime_t t1 = gethrtime(); for (int i=0; ioperationFacade(); } hrtime_t t2 = gethrtime(); cout << (t2-t1)/1000000 << " "; return 1; }