diff options
author | vishal <vishal@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1998-12-31 21:04:52 +0000 |
---|---|---|
committer | vishal <vishal@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1998-12-31 21:04:52 +0000 |
commit | 1557ba1c6ae4b81835132607809a759ee6cba812 (patch) | |
tree | 169238ed2627ac1886d64fef87e020431f8f76d3 /TAO | |
parent | 3e4a2ed109eff90d3857d2aea09001719d6d4148 (diff) | |
download | ATCD-1557ba1c6ae4b81835132607809a759ee6cba812.tar.gz |
*** empty log message ***
Diffstat (limited to 'TAO')
-rw-r--r-- | TAO/orbsvcs/orbsvcs/Time/TAO_TIO.cpp | 10 | ||||
-rw-r--r-- | TAO/orbsvcs/orbsvcs/Time/TAO_Time_Service_Server.cpp | 52 | ||||
-rw-r--r-- | TAO/orbsvcs/orbsvcs/Time/TAO_UTO.cpp | 21 |
3 files changed, 32 insertions, 51 deletions
diff --git a/TAO/orbsvcs/orbsvcs/Time/TAO_TIO.cpp b/TAO/orbsvcs/orbsvcs/Time/TAO_TIO.cpp index e2aba370d70..96fbbbcbbfc 100644 --- a/TAO/orbsvcs/orbsvcs/Time/TAO_TIO.cpp +++ b/TAO/orbsvcs/orbsvcs/Time/TAO_TIO.cpp @@ -119,8 +119,6 @@ TAO_TIO::spans (CosTime::UTO_ptr uto, overlap = tio->_this (); } - - return CosTime::OTNoOverlap; } TAO_CATCHANY { @@ -128,6 +126,7 @@ TAO_TIO::spans (CosTime::UTO_ptr uto, } TAO_ENDTRY; + return CosTime::OTNoOverlap; } // This operation returns a value of type OverlapType depending on how @@ -226,14 +225,14 @@ TAO_TIO::overlaps (CosTime::TIO_ptr tio, overlap = tio_i->_this (); } - - return CosTime::OTNoOverlap; } TAO_CATCHANY { TAO_TRY_ENV.print_exception ("Exception:"); } TAO_ENDTRY; + + return CosTime::OTNoOverlap; } CosTime::UTO_ptr @@ -251,11 +250,12 @@ TAO_TIO::time (CORBA::Environment &_env) 0), CORBA::NO_MEMORY (CORBA::COMPLETED_NO), CosTime::UTO::_nil ()); - return uto->_this (); } TAO_CATCHANY { TAO_TRY_ENV.print_exception ("Exception:"); + return CosTime::UTO::_nil (); } TAO_ENDTRY; + return uto->_this (); } diff --git a/TAO/orbsvcs/orbsvcs/Time/TAO_Time_Service_Server.cpp b/TAO/orbsvcs/orbsvcs/Time/TAO_Time_Service_Server.cpp index 7755a665bd9..f900354f303 100644 --- a/TAO/orbsvcs/orbsvcs/Time/TAO_Time_Service_Server.cpp +++ b/TAO/orbsvcs/orbsvcs/Time/TAO_Time_Service_Server.cpp @@ -23,24 +23,15 @@ TAO_Time_Service_Server::universal_time (CORBA::Environment &_env) { TAO_UTO *uto = 0; - TAO_TRY - { - // Return the local time of the system as a UTO. - ACE_NEW_THROW_RETURN (uto, - TAO_UTO (CORBA::ULongLong (ACE_OS::gettimeofday ().sec ()), - 0, - 0), - CORBA::NO_MEMORY (CORBA::COMPLETED_NO), - CosTime::UTO::_nil ()); - - return uto->_this (TAO_TRY_ENV); - TAO_CHECK_ENV; - } - TAO_CATCHANY - { - TAO_TRY_ENV.print_exception ("Exception:"); - } - TAO_ENDTRY; + // Return the local time of the system as a UTO. + ACE_NEW_THROW_RETURN (uto, + TAO_UTO (CORBA::ULongLong (ACE_OS::gettimeofday ().sec ()), + 0, + 0), + CORBA::NO_MEMORY (CORBA::COMPLETED_NO), + CosTime::UTO::_nil ()); + + return uto->_this (); } // This method returns the current time in a UTO only if the time can @@ -72,22 +63,15 @@ TAO_Time_Service_Server::new_universal_time (TimeBase::TimeT time, CORBA::Environment &_env) { TAO_UTO *uto = 0; - TAO_TRY - { - ACE_NEW_THROW_RETURN (uto, - TAO_UTO (time, - inaccuracy, - tdf), - CORBA::NO_MEMORY (CORBA::COMPLETED_NO), - CosTime::UTO::_nil ()); - - return uto->_this (TAO_TRY_ENV); - } - TAO_CATCHANY - { - TAO_TRY_ENV.print_exception ("Exception:"); - } - TAO_ENDTRY; + + ACE_NEW_THROW_RETURN (uto, + TAO_UTO (time, + inaccuracy, + tdf), + CORBA::NO_MEMORY (CORBA::COMPLETED_NO), + CosTime::UTO::_nil ()); + + return uto->_this (); } diff --git a/TAO/orbsvcs/orbsvcs/Time/TAO_UTO.cpp b/TAO/orbsvcs/orbsvcs/Time/TAO_UTO.cpp index 6b612f1f080..f7c937640e7 100644 --- a/TAO/orbsvcs/orbsvcs/Time/TAO_UTO.cpp +++ b/TAO/orbsvcs/orbsvcs/Time/TAO_UTO.cpp @@ -9,15 +9,6 @@ TAO_UTO::TAO_UTO (TimeBase::TimeT time, TimeBase::InaccuracyT inaccuracy, TimeBase::TdfT tdf) - // @@ Vishal, please consider putting these assignments into the - // constructor of attr_utc_time_. BTW, I think some of your other - // implementation classes could benefit from this same technique. - - // ?? Tried to initialise the structure here. Failed. - - // @@ Vishal, you'll need to add a CONSTRUCTOR for the structure and - // then initialize this. Please let me know if you have any - // questions about how to do that. { this->attr_utc_time_.time = time; this->attr_utc_time_.inacchi = inaccuracy / 2; @@ -109,13 +100,14 @@ TAO_UTO::compare_time (CosTime::ComparisonType comparison_type, return CosTime::TCLessThan; } - return CosTime::TCIndeterminate; } TAO_CATCHANY { TAO_TRY_ENV.print_exception ("Exception:"); } TAO_ENDTRY; + + return CosTime::TCIndeterminate; } // Returns a TIO representing the time interval between the time in @@ -145,13 +137,16 @@ TAO_UTO::time_to_interval (CosTime::UTO_ptr uto, CORBA::NO_MEMORY (CORBA::COMPLETED_NO), CosTime::TIO::_nil ()); TAO_CHECK_ENV; - return tio->_this (); + } TAO_CATCHANY { TAO_TRY_ENV.print_exception ("Exception:"); + return CosTime::TIO::_nil (); } TAO_ENDTRY; + + return tio->_this (); } // Returns a TIO object representing the error interval around the @@ -178,11 +173,13 @@ TAO_UTO::interval (CORBA::Environment &_env) CORBA::NO_MEMORY (CORBA::COMPLETED_NO), CosTime::TIO::_nil ()); TAO_CHECK_ENV; - return tio->_this (); } TAO_CATCHANY { TAO_TRY_ENV.print_exception ("Exception:"); + return CosTime::TIO::_nil (); } TAO_ENDTRY; + + return tio->_this (); }; |