--- a/src/utils/smallut.h
+++ b/src/utils/smallut.h
@@ -1,6 +1,6 @@
#ifndef _SMALLUT_H_INCLUDED_
#define _SMALLUT_H_INCLUDED_
-/* @(#$Id: smallut.h,v 1.13 2006-01-26 07:03:35 dockes Exp $ (C) 2004 J.F.Dockes */
+/* @(#$Id: smallut.h,v 1.14 2006-01-26 12:29:20 dockes Exp $ (C) 2004 J.F.Dockes */
#include <string>
#include <list>
@@ -40,6 +40,30 @@
tab}) at beginning and end of input string */
extern void trimstring(string &s, const char *ws = " \t");
+/** Escape things like < or & by turining them to entities */
extern string escapeHtml(const string &in);
+
+class Chrono {
+ public:
+ Chrono();
+ /** Reset origin */
+ long restart();
+ /** Snapshot current time */
+ static void refnow();
+ /** Get current elapsed since creation or restart
+ *
+ * @param frozen give time since the last refnow call (this is to
+ * allow for using one actual system call to get values from many
+ * chrono objects, like when examining timeouts in a queue)
+ */
+ long millis(int frozen = 0);
+ long micros(int frozen = 0);
+ float secs(int frozen = 0);
+ private:
+ long m_secs;
+ long m_nsecs;
+};
+
+
#endif /* _SMALLUT_H_INCLUDED_ */