Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Supported by

[open] Timed loops

edited April 2013 in OpenSesame


My training group is supposed to do an exercise loop for fourteen minutes, and finish the loop they're on when the times runs out after which the excercise ends. I'm wondering if there is a built in feature to set a loop to run for a set amount of time or if I have to do it with inline scripts, I didn't find anything in the documentation concerning it.



  • edited 12:28PM

    Hi Benjamin,

    The easiest way to accomplish this is by using the 'Break if' statement, which is under 'Show advanced options' in the loop item. For example, the following 'Break if' statement aborts the loop 10 seconds after start time (which you need to set, see below):

    =self.time() - self.get('start_time') > 10000

    This is a Python-style conditional statement, as described here:

    Of course, to make this work, you also need to set the variable start_time. You can do this with a simple inline_script, which you can insert (typically) just before the block_loop:

    exp.set('start_time', self.time())

    Hope this helps!


  • edited 12:28PM

    Hi Sebastiaan,

    'Break if' statement could abort the loop 10 seconds after start time, as in your example. In this case, the timing to abort the loop is before going into the next loop. In my case, I want to abort the loop after a certain period of time, even if it is running the current loop. Is it possible to do so? How can I do to force-quit the sequences after a certain period of time?

    Thanks in advance.

  • edited 12:28PM

    Hi Koba,

    How can I do to force-quit the sequences after a certain period of time?

    This is not really possible. What you can do to accomplish this to some extent is use Run if statements for all items in the sequence, so that these items are skipped when the time period has expired. Something like: =self.time() - self.get('start_time') <= 10000.

    However, this would not halt execution while an item is running (for example while a keyboard_response item is waiting for a response). To accomplish this, you would really need to write an inline script that continuously checks whether the time period has expired, and halts when this happens. Does that make sense?


  • edited 12:28PM

    Thanks, this was exactly what I was looking for.

  • edited April 2013

    Thank you for your quick response.
    I can see your point. Indeed this doesn't sit well with me, but it looks difficult for me to write an incline script that continuously checks the time...

    And, Thank you very much for Runtime for Android. Looking forward to activating the synth and sampler sampler item.

    Kind regards,

Sign In or Register to comment.

agen judi bola , sportbook, casino, togel, number game, singapore, tangkas, basket, slot, poker, dominoqq, agen bola. Semua permainan bisa dimainkan hanya dengan 1 ID. minimal deposit 50.000 ,- bonus cashback hingga 10% , diskon togel hingga 66% bisa bermain di android dan IOS kapanpun dan dimana pun. poker , bandarq , aduq, domino qq , dominobet. Semua permainan bisa dimainkan hanya dengan 1 ID. minimal deposit 10.000 ,- bonus turnover 0.5% dan bonus referral 20%. Bonus - bonus yang dihadirkan bisa terbilang cukup tinggi dan memuaskan, anda hanya perlu memasang pada situs yang memberikan bursa pasaran terbaik yaitu Bola168. Situs penyedia segala jenis permainan poker online kini semakin banyak ditemukan di Internet, salah satunya TahunQQ merupakan situs Agen Judi Domino66 Dan BandarQ Terpercaya yang mampu memberikan banyak provit bagi bettornya. Permainan Yang Di Sediakan Dewi365 Juga sangat banyak Dan menarik dan Peluang untuk memenangkan Taruhan Judi online ini juga sangat mudah . Mainkan Segera Taruhan Sportbook anda bersama Agen Judi Bola Bersama Dewi365 Kemenangan Anda Berapa pun akan Terbayarkan. Tersedia 9 macam permainan seru yang bisa kamu mainkan hanya di dalam 1 ID saja. Permainan seru yang tersedia seperti Poker, Domino QQ Dan juga BandarQ Online. Semuanya tersedia lengkap hanya di ABGQQ. Situs ABGQQ sangat mudah dimenangkan, kamu juga akan mendapatkan mega bonus dan setiap pemain berhak mendapatkan cashback mingguan. ABGQQ juga telah diakui sebagai Bandar Domino Online yang menjamin sistem FAIR PLAY disetiap permainan yang bisa dimainkan dengan deposit minimal hanya Rp.25.000. DEWI365 adalah Bandar Judi Bola Terpercaya & resmi dan terpercaya di indonesia. Situs judi bola ini menyediakan fasilitas bagi anda untuk dapat bermain memainkan permainan judi bola. Didalam situs ini memiliki berbagai permainan taruhan bola terlengkap seperti Sbobet, yang membuat DEWI365 menjadi situs judi bola terbaik dan terpercaya di Indonesia. Tentunya sebagai situs yang bertugas sebagai Bandar Poker Online pastinya akan berusaha untuk menjaga semua informasi dan keamanan yang terdapat di POKERQQ13. Kotakqq adalah situs Judi Poker Online Terpercayayang menyediakan 9 jenis permainan sakong online, dominoqq, domino99, bandarq, bandar ceme, aduq, poker online, bandar poker, balak66, perang baccarat, dan capsa susun. Dengan minimal deposit withdraw 15.000 Anda sudah bisa memainkan semua permaina pkv games di situs kami. Jackpot besar,Win rate tinggi, Fair play, PKV Games