~valavanisalex/ubuntu/oneiric/inkscape/inkscape_0.48.1-2ubuntu4

« back to all changes in this revision

Viewing changes to src/debug/gdk-event-latency-tracker.h

  • Committer: Bazaar Package Importer
  • Author(s): Kees Cook, Ted Gould, Kees Cook
  • Date: 2009-06-24 14:00:43 UTC
  • mfrom: (1.1.8 upstream)
  • Revision ID: james.westby@ubuntu.com-20090624140043-07stp20mry48hqup
Tags: 0.47~pre0-0ubuntu1
* New upstream release

[ Ted Gould ]
* debian/control: Adding libgsl0 and removing version specifics on boost

[ Kees Cook ]
* debian/watch: updated to run uupdate and mangle pre-release versions.
* Dropped patches that have been taken upstream:
  - 01_mips
  - 02-poppler-0.8.3
  - 03-chinese-inkscape
  - 05_fix_latex_patch
  - 06_gcc-4.4
  - 07_cdr2svg
  - 08_skip-bad-utf-on-pdf-import
  - 09_gtk-clist
  - 10_belarussian
  - 11_libpng
  - 12_desktop
  - 13_slider
  - 100_svg_import_improvements
  - 102_sp_pattern_painter_free
  - 103_bitmap_type_print

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * Inkscape::Debug::GdkEventLatencyTracker - tracks backlog of GDK events
 
3
 *
 
4
 * Authors:
 
5
 *   MenTaLguY <mental@rydia.net>
 
6
 *
 
7
 * Copyright (C) 2008 MenTaLguY
 
8
 *
 
9
 * Released under GNU GPL, read the file 'COPYING' for more information
 
10
 */
 
11
 
 
12
#ifndef SEEN_INKSCAPE_DEBUG_GDK_EVENT_LATENCY_TRACKER_H
 
13
#define SEEN_INKSCAPE_DEBUG_GDK_EVENT_LATENCY_TRACKER_H
 
14
 
 
15
#include <gdk/gdkevents.h>
 
16
#include <glibmm/timer.h>
 
17
#include <boost/optional.hpp>
 
18
 
 
19
namespace Inkscape {
 
20
namespace Debug {
 
21
 
 
22
class GdkEventLatencyTracker {
 
23
public:
 
24
    GdkEventLatencyTracker();
 
25
    boost::optional<double> process(GdkEvent const *e);
 
26
    double maxLatency() const { return max_latency; }
 
27
    double getSkew();
 
28
 
 
29
    static GdkEventLatencyTracker &default_tracker();
 
30
 
 
31
private:
 
32
    GdkEventLatencyTracker(GdkEventLatencyTracker const &); // no copy
 
33
    void operator=(GdkEventLatencyTracker const &); // no assign
 
34
 
 
35
    double start_seconds;
 
36
    double max_latency;
 
37
    double skew;
 
38
    double last_elapsed;
 
39
    double last_seconds;
 
40
    Glib::Timer elapsed;
 
41
};
 
42
 
 
43
}
 
44
}
 
45
 
 
46
#endif
 
47
/*
 
48
  Local Variables:
 
49
  mode:c++
 
50
  c-file-style:"stroustrup"
 
51
  c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
 
52
  indent-tabs-mode:nil
 
53
  fill-column:99
 
54
  End:
 
55
*/
 
56
// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=99 :