2 #include "Time_Date_i.h"
3 #include "ace/OS_NS_time.h"
4 #include "ace/Reactor.h"
6 // Obtain the time and date in binary format.
8 Time_Date_i::bin_date (CORBA::Long_out time_date
)
10 time_date
= static_cast<CORBA::Long
> (ACE_OS::time (0));
13 // Obtain the time and date in string format.
15 Time_Date_i::str_date (CORBA::String_out time_date
)
17 const time_t time
= ACE_OS::time (0);
19 time_date
= CORBA::string_dup (ACE_TEXT_ALWAYS_CHAR(ACE_OS::ctime (&time
)));
24 Time_Date_i::shutdown ()
27 ACE_TEXT ("Time_Date_i is shutting down\n")));
29 // Instruct the ORB to shutdown.
30 this->orb_var_
->shutdown ();
31 // And shutdown the event loop from started in main.
32 ACE_Reactor::end_event_loop ();
36 Time_Date_i::orb (CORBA::ORB_ptr orb_ptr
)
38 orb_var_
= CORBA::ORB::_duplicate (orb_ptr
);