#include "amh_ami_pch.h"
/* -*- C++ -*- $Id: inner_i.cpp 83398 2008-10-22 15:45:34Z sowayaa $ */

// ******  Code generated by the The ACE ORB (TAO) IDL Compiler *******
// TAO and the TAO IDL Compiler have been developed by the Center for
// Distributed Object Computing at Washington University, St. Louis.
//
// Information about TAO is available at:
//                 http://www.cs.wustl.edu/~schmidt/TAO.html

#include "inner_i.h"
#include "ace/OS.h"

Inner_i::Inner_i (int d)
  : divisor_ (d)
{
}

char *
Inner_i::answer (const char * question)
{
  ACE_UNUSED_ARG (question); // doesn't matter

  CORBA::String_var answer =
    CORBA::string_dup ("I didn't know dogs could talk!");

  int delay = 5/this->divisor_; // throw exception if divisor = 0

  ACE_OS::sleep(delay); // make the caller wait a bit
  return answer._retn();
}
