Skip to content

Commit 2c5a798

Browse files
committed
Spider - fix time_warp
With recent link changes, time_warp's behaviour was broken in that it never properly reset time between each iteration. This has now been fixed.
1 parent edb9a52 commit 2c5a798

File tree

1 file changed

+2
-4
lines changed
  • app/server/ruby/lib/sonicpi/lang

1 file changed

+2
-4
lines changed

app/server/ruby/lib/sonicpi/lang/core.rb

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -957,10 +957,8 @@ def time_warp(times=0, params=nil, &block)
957957

958958
__system_thread_locals.set(:sonic_pi_spider_time_warp_start, __get_spider_time) unless already_in_time_warp
959959
__system_thread_locals.set_local :sonic_pi_spider_in_time_warp, true
960-
__with_preserved_spider_time_and_beat do
961-
962-
times.each_with_index do |delta, idx|
963-
960+
times.each_with_index do |delta, idx|
961+
__with_preserved_spider_time_and_beat do
964962
sleep delta
965963

966964
case block.arity

0 commit comments

Comments
 (0)