23 #ifndef SPOT_MISC_TIMER_HH
24 # define SPOT_MISC_TIMER_HH
26 # include "misc/_config.h"
31 # if SPOT_HAVE_SYS_TIMES_H
32 # include <sys/times.h>
68 #ifdef SPOT_HAVE_TIMES
82 #ifdef SPOT_HAVE_TIMES
155 tm[name].first.stop();
168 tm_type::iterator i =
tm.find(name);
169 assert(i !=
tm.end());
170 assert(0 < i->second.second);
171 if (0 == --i->second.second)
177 timer(
const std::string& name)
const
179 tm_type::const_iterator i =
tm.find(name);
180 assert(i !=
tm.end());
181 return i->second.first;
188 return tm[name].first;
204 print(std::ostream& os)
const;
215 typedef std::map<std::string, item_type>
tm_type;
222 #endif // SPOT_MISC_TIMER_HH