1 /*
2 * Inkscape::Debug::SimpleEvent - trivial implementation of Debug::Event
3 *
4 * Authors:
5 * MenTaLguY <mental@rydia.net>
6 *
7 * Copyright (C) 2007 MenTaLguY
8 *
9 * Released under GNU GPL, read the file 'COPYING' for more information
10 */
13 #include <glib/gtypes.h>
14 #include <glib/gmain.h>
15 #include <glibmm/ustring.h>
16 #include "debug/simple-event.h"
18 namespace Inkscape {
20 namespace Debug {
22 Util::ptr_shared<char> timestamp() {
23 Util::ptr_shared<char> result;
24 GTimeVal timestamp;
25 g_get_current_time(×tamp);
26 gchar *value = g_strdup_printf( "%d.%06d", static_cast<gint>(timestamp.tv_sec), static_cast<gint>(timestamp.tv_usec) );
27 result = Util::share_string(value);
28 g_free(value);
29 return result;
30 }
32 }
34 }
36 /*
37 Local Variables:
38 mode:c++
39 c-file-style:"stroustrup"
40 c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
41 indent-tabs-mode:nil
42 fill-column:99
43 End:
44 */
45 // vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=99 :