From c41c7f2c353323962537cc5abea7a3acc0bd8ed9 Mon Sep 17 00:00:00 2001 From: nshankar Date: Wed, 11 Oct 2006 14:05:14 +0000 Subject: Wed Oct 11 14:02:30 UTC 2006 Nishanth Shankaran --- ChangeLog | 9 +++++++++ Controller/Component/starter.cpp | 17 ++++++++--------- Monitor/Local_Monitor/Local_Monitor.cpp | 10 ++++++---- Monitor/Local_Monitor/Local_Monitor.h | 7 +++++-- common/OpString.idl | 2 +- 5 files changed, 29 insertions(+), 16 deletions(-) diff --git a/ChangeLog b/ChangeLog index a92cf00ae3d..c1f2b2c89ed 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +Wed Oct 11 14:02:30 UTC 2006 Nishanth Shankaran + + * Controller/Component/starter.cpp: + * Monitor/Local_Monitor/Local_Monitor.h: + * Monitor/Local_Monitor/Local_Monitor.cpp: Fixed compilation + errors on windows. + + * common/OpString.idl: Fixed compilation errors. + Wed Oct 11 00:48:28 UTC 2006 Nishanth Shankaran * Controller/Component/Controller.mpc: diff --git a/Controller/Component/starter.cpp b/Controller/Component/starter.cpp index 4fd4dd51d75..512cb48f960 100644 --- a/Controller/Component/starter.cpp +++ b/Controller/Component/starter.cpp @@ -5,14 +5,13 @@ //IOR file of the Controller const char * ior = 0; -enum input {ERROR, START, STOP}; -input +int parse_args (int argc, char *argv[]) { ACE_Get_Opt get_opts (argc, argv, "k:s"); int c = 0; - input in = STOP; + int ret = 0; while ((c = get_opts ()) != -1) { switch (c) @@ -22,7 +21,7 @@ parse_args (int argc, char *argv[]) break; case 's': - in = START; + ret = 1; break; case '?': // display help for use of the server. @@ -33,7 +32,7 @@ parse_args (int argc, char *argv[]) "-s Start the controller " "(defaults to stop the controller)\n", argv [0]), - ERROR); + -1); break; } @@ -44,7 +43,7 @@ parse_args (int argc, char *argv[]) ior = "file://Controller.ior"; } - return in; + return ret; } int @@ -54,8 +53,8 @@ main (int argc, char *argv[]) { CORBA::ORB_var orb = CORBA::ORB_init (argc, argv, ""); - input ret = parse_args (argc, argv); - if (ret == ERROR) + int ret = parse_args (argc, argv); + if (ret == -1) { return -1; } @@ -72,7 +71,7 @@ main (int argc, char *argv[]) -1); } - if (ret == START) + if (ret == 1) { trigger->start_controller (); } diff --git a/Monitor/Local_Monitor/Local_Monitor.cpp b/Monitor/Local_Monitor/Local_Monitor.cpp index 88a7dea29cf..c8fc549a441 100644 --- a/Monitor/Local_Monitor/Local_Monitor.cpp +++ b/Monitor/Local_Monitor/Local_Monitor.cpp @@ -141,7 +141,7 @@ namespace CIAO { this->instance_id_ = CORBA::string_dup (id); } - this->start_time_ = ACE_OS::gettimeofday (); + this->timer_.start (); } void @@ -151,12 +151,14 @@ namespace CIAO { return; } - size_t temp = (ACE_OS::gettimeofday () - this->start_time_).msec (); - + this->timer_.stop (); + ACE_Time_Value time; + this->timer_.elapsed_time (time); + this->mutex_.acquire (); this->delays_.length (this->delays_.length () + 1); - this->delays_ [this->delays_.length () - 1] = temp; + this->delays_ [this->delays_.length () - 1] = time.msec (); this->mutex_.release (); } diff --git a/Monitor/Local_Monitor/Local_Monitor.h b/Monitor/Local_Monitor/Local_Monitor.h index 81259e13203..12f38f5ea9b 100644 --- a/Monitor/Local_Monitor/Local_Monitor.h +++ b/Monitor/Local_Monitor/Local_Monitor.h @@ -1,11 +1,12 @@ #ifndef LOCAL_MONITOR_H #define LOCAL_MONITOR_H -#include "ace/Time_Value.h" +//#include "ace/Time_Value.h" #include "ace/Log_Msg.h" #include "ace/Thread.h" #include "ace/Event_Handler.h" #include "ace/Mutex.h" +#include "ace/High_Res_Timer.h" #include "orbsvcs/Naming/Naming_Server.h" #include "RACE/Monitor/Central_Monitor/MonitorC.h" @@ -61,7 +62,9 @@ namespace CIAO ACE_Time_Value interval_; - ACE_Time_Value start_time_; + ACE_Time_Value start_time_; + + ACE_High_Res_Timer timer_; Execution_Time_Monitor_var monitor_; diff --git a/common/OpString.idl b/common/OpString.idl index fddfa2069a4..c279f00178b 100644 --- a/common/OpString.idl +++ b/common/OpString.idl @@ -35,7 +35,7 @@ module CIAO string taskId; - string typeId; + string taskTypeId; string suggestedImpl; -- cgit v1.2.1