summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2014-11-07 18:13:36 +0000
committerDavid Robillard <d@drobilla.net>2014-11-07 18:13:36 +0000
commitc7383f88f7ac3fba6a4c14cadbb5742b3917e035 (patch)
tree182ad18bc8704930da92ff5b4b8fbda94cd7048f /src
parentc9ce344351737e80576d63048fd04963a811b9b3 (diff)
downloadganv-c7383f88f7ac3fba6a4c14cadbb5742b3917e035.tar.gz
ganv-c7383f88f7ac3fba6a4c14cadbb5742b3917e035.tar.bz2
ganv-c7383f88f7ac3fba6a4c14cadbb5742b3917e035.zip
Fix compilation with --no-fdgl (patch from Vlad Glagolev).
git-svn-id: http://svn.drobilla.net/lad/trunk/ganv@5480 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src')
-rw-r--r--src/Canvas.cpp24
1 files changed, 12 insertions, 12 deletions
diff --git a/src/Canvas.cpp b/src/Canvas.cpp
index f1494a0..6b16230 100644
--- a/src/Canvas.cpp
+++ b/src/Canvas.cpp
@@ -760,6 +760,18 @@ GanvCanvasImpl::layout_dot(const std::string& filename)
}
#endif
+inline uint64_t
+get_monotonic_time()
+{
+#if GLIB_CHECK_VERSION(2, 28, 0)
+ return g_get_monotonic_time();
+#else
+ GTimeVal time;
+ g_get_current_time(&time);
+ return time.tv_sec + time.tv_usec;
+#endif
+}
+
#ifdef GANV_FDGL
inline Region
@@ -788,18 +800,6 @@ apply_force(GanvNode* a, GanvNode* b, const Vector& f)
b->impl->force = vec_sub(b->impl->force, f);
}
-inline uint64_t
-get_monotonic_time()
-{
-#if GLIB_CHECK_VERSION(2, 28, 0)
- return g_get_monotonic_time();
-#else
- GTimeVal time;
- g_get_current_time(&time);
- return time.tv_sec + time.tv_usec;
-#endif
-}
-
gboolean
GanvCanvasImpl::layout_iteration()
{