Changeset 7208 for code/trunk/src/modules/pickup/Pickup.cc
- Timestamp:
- Aug 24, 2010, 9:49:54 AM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/trunk/src/modules/pickup/Pickup.cc
r7163 r7208 236 236 } 237 237 238 /**239 @brief240 Starts the pickup duration timer.241 After the specified durationTime has expired the function pickupTimerCallback is called.242 pickupTimerCallback can be overloaded and thus the desired functionality can be implemented.243 @param durationTime244 The duration after which the expires and the callback function is called.245 @return246 Returns true if the pickup duration timer was started successfully, false if not.247 */248 bool Pickup::startPickupTimer(float durationTime)249 {250 if (durationTime<=0)251 {252 COUT(1) << "Invalid durationTime in pickup." << std::endl;253 return false;254 }255 if (this->durationTimer_.isActive()) //!< Check if Timer is already running256 {257 COUT(1) << "Pickup durationTimer already in use." << std::endl;258 return false;259 }260 this->durationTimer_.setTimer(durationTime, false, createExecutor(createFunctor(&Pickup::pickupTimerCallback, this)));261 return true;262 }263 238 }
Note: See TracChangeset
for help on using the changeset viewer.