diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2008-05-15 14:13:47 +0000 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2008-05-15 14:13:47 +0000 |
commit | 5ea9dee73b75b01e6db3a5a97c5a02493b358b00 (patch) | |
tree | 76674e0ecbb06b87c54dd7b50e1ccf1a66ce6829 /gtk2_ardour/ardour_ui2.cc | |
parent | e313838485697033d1b7366105968d789ea4228e (diff) |
mike taht's patch to remove all use of gettimeofday() in favor of ARDOUR::get_microseconds() which now uses JACK's usec clock
git-svn-id: svn://localhost/ardour2/branches/2.0-ongoing@3355 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/ardour_ui2.cc')
-rw-r--r-- | gtk2_ardour/ardour_ui2.cc | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/gtk2_ardour/ardour_ui2.cc b/gtk2_ardour/ardour_ui2.cc index 8a29e64c6d..50fe0e21db 100644 --- a/gtk2_ardour/ardour_ui2.cc +++ b/gtk2_ardour/ardour_ui2.cc @@ -755,17 +755,13 @@ ARDOUR_UI::set_shuttle_fract (double f) void ARDOUR_UI::use_shuttle_fract (bool force) { - struct timeval now; - struct timeval diff; + microseconds_t now = get_microseconds(); /* do not attempt to submit a motion-driven transport speed request more than once per process cycle. */ - gettimeofday (&now, 0); - timersub (&now, &last_shuttle_request, &diff); - - if (!force && (diff.tv_usec + (diff.tv_sec * 1000000)) < engine->usecs_per_cycle()) { + if (!force && (last_shuttle_request - now) < engine->usecs_per_cycle()) { return; } |