diff options
author | levine <levine@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1997-10-22 12:24:25 +0000 |
---|---|---|
committer | levine <levine@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1997-10-22 12:24:25 +0000 |
commit | a3a343a08ef664e228a1e10a53f2f042724febe4 (patch) | |
tree | 1af0d7a4e06a684b241179a5863f057aaa041c53 /examples/Service_Configurator | |
parent | 2cfea4649b7d3649d1fa85e877f9750f3ab00605 (diff) | |
download | ATCD-a3a343a08ef664e228a1e10a53f2f042724febe4.tar.gz |
convert arg to long if ACE_HAS_64BIT_LONGS.
Diffstat (limited to 'examples/Service_Configurator')
-rw-r--r-- | examples/Service_Configurator/IPC-tests/server/Handle_Timeout.i | 24 |
1 files changed, 15 insertions, 9 deletions
diff --git a/examples/Service_Configurator/IPC-tests/server/Handle_Timeout.i b/examples/Service_Configurator/IPC-tests/server/Handle_Timeout.i index f522de2cc9b..16865853d70 100644 --- a/examples/Service_Configurator/IPC-tests/server/Handle_Timeout.i +++ b/examples/Service_Configurator/IPC-tests/server/Handle_Timeout.i @@ -34,7 +34,7 @@ Handle_Timeout::init (int argc, char *argv[]) for (int c; (c = get_opt ()) != -1; ) switch (c) { - case 'd': + case 'd': delta.sec (ACE_OS::atoi (get_opt.optarg)); break; case 'i': @@ -46,18 +46,18 @@ Handle_Timeout::init (int argc, char *argv[]) default: break; } - - if (ACE_Reactor::instance ()->schedule_timer (this, - (void *) arg, - delta, + + if (ACE_Reactor::instance ()->schedule_timer (this, + (void *) arg, + delta, interval) == -1) return -1; else return 0; } -ACE_INLINE int -Handle_Timeout::fini (void) +ACE_INLINE int +Handle_Timeout::fini (void) { return 0; } @@ -69,14 +69,20 @@ Handle_Timeout::get_handle (void) const } ACE_INLINE int -Handle_Timeout::handle_timeout (const ACE_Time_Value &tv, +Handle_Timeout::handle_timeout (const ACE_Time_Value &tv, const void *arg) { if (this->count++ >= 10) return -1; // Automatically cancel periodic timer... - ACE_DEBUG ((LM_INFO, +#if defined (ACE_HAS_64BIT_LONGS) + ACE_DEBUG ((LM_INFO, + "time for this(%u) expired at (%d, %d) with arg = %d\n", + this, tv.sec (), tv.usec (), long (arg))); +#else /* ! ACE_HAS_64BIT_LONGS */ + ACE_DEBUG ((LM_INFO, "time for this(%u) expired at (%d, %d) with arg = %d\n", this, tv.sec (), tv.usec (), int (arg))); +#endif /* ! ACE_HAS_64BIT_LONGS */ return 0; } |