summaryrefslogtreecommitdiffstats
path: root/kdm/kfrontend/kdmconfig.h
diff options
context:
space:
mode:
Diffstat (limited to 'kdm/kfrontend/kdmconfig.h')
-rw-r--r--kdm/kfrontend/kdmconfig.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/kdm/kfrontend/kdmconfig.h b/kdm/kfrontend/kdmconfig.h
index f5420bcc4..52e054af6 100644
--- a/kdm/kfrontend/kdmconfig.h
+++ b/kdm/kfrontend/kdmconfig.h
@@ -35,6 +35,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#include <tqstring.h>
#include <tqstringlist.h>
#include <tqfont.h>
+#include <sys/time.h>
extern TQString _stsFile;
extern bool _isLocal;
@@ -46,6 +47,19 @@ CONF_GREET_CPP_DECLS
struct dpySpec;
void decodeSess( dpySpec *sess, TQString &user, TQString &loc );
+extern struct timeval st;
+
+inline TQString timestamp() {
+ struct timeval nst;
+ gettimeofday(&nst, 0);
+ if (!st.tv_sec)
+ gettimeofday(&st, 0);
+
+ TQString ret;
+ ret.sprintf("[%07ld]", (nst.tv_sec - st.tv_sec) * 1000 + (nst.tv_usec - st.tv_usec) / 1000);
+ return ret;
+}
+
extern "C"
#endif
void init_config( void );