25 #ifndef SPOT_MISC_TIMER_HH
26 # define SPOT_MISC_TIMER_HH
28 # include "misc/_config.h"
33 # if SPOT_HAVE_SYS_TIMES_H
34 # include <sys/times.h>
70 #ifdef SPOT_HAVE_TIMES
84 #ifdef SPOT_HAVE_TIMES
157 tm[name].first.stop();
170 tm_type::iterator i =
tm.find(name);
171 assert(i !=
tm.end());
172 assert(0 < i->second.second);
173 if (0 == --i->second.second)
179 timer(
const std::string& name)
const
181 tm_type::const_iterator i =
tm.find(name);
182 assert(i !=
tm.end());
183 return i->second.first;
190 return tm[name].first;
206 print(std::ostream& os)
const;
217 typedef std::map<std::string, item_type>
tm_type;
224 #endif // SPOT_MISC_TIMER_HH