Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.javascript > #40219

Re: Coord timed events

Path csiph.com!news.swapon.de!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From Ben Bacarisse <ben.usenet@bsb.me.uk>
Newsgroups comp.lang.javascript
Subject Re: Coord timed events
Date Thu, 17 Jun 2021 02:06:55 +0100
Organization A noiseless patient Spider
Lines 14
Message-ID <87eed1jo40.fsf@bsb.me.uk> (permalink)
References <h_KdnVLOH6-pAVf9nZ2dnUU7-efNnZ2d@westnet.com.au>
Mime-Version 1.0
Content-Type text/plain
Injection-Info reader02.eternal-september.org; posting-host="dba4e90f2d9a52676a13a099c8050f76"; logging-data="14090"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/n3GcSm22zkxzhCWRjIEsi4Mkki4DdNLI="
Cancel-Lock sha1:ciUZ1idxtb9QcckxDopig9QJThg= sha1:oldYL1VoEiaMMH/rvOtWpjajjIs=
X-BSB-Auth 1.e6d5f332ec286c1e1fa7.20210617020655BST.87eed1jo40.fsf@bsb.me.uk
Xref csiph.com comp.lang.javascript:40219

Show key headers only | View raw


Andrew Poulos <ap_prog@hotmail.com> writes:

> I need to trigger up to 12 "events" with timings a user sets. The
> timings (in seconds) could be anything from 0 to, say, 300.
>
> One way I though to handle them was to: put the timings into an array,
> sort the array (from lowest to highest), loop over the array and call
> setTimeout on each one.

Hmm...  Why not just call setTimeout without sorting them?  I must be
missing some key part of the problem...

-- 
Ben.

Back to comp.lang.javascript | Previous | Next — Next in thread | Find similar | Unroll thread


Thread

Re: Coord timed events Ben Bacarisse <ben.usenet@bsb.me.uk> - 2021-06-17 02:06 +0100
  Re: Coord timed events Andrew Poulos <ap_prog@hotmail.com> - 2021-06-17 13:17 +1000
    Re: Coord timed events Ben Bacarisse <ben.usenet@bsb.me.uk> - 2021-06-17 11:20 +0100
    Re: Coord timed events Scott Sauyet <scott@sauyet.com> - 2021-06-17 13:21 -0700
      Re: Coord timed events Andrew Poulos <ap_prog@hotmail.com> - 2021-06-18 11:03 +1000
        Re: Coord timed events Jonas Thörnvall <jonas.thornvall@gmail.com> - 2021-06-20 23:40 -0700
          Re: Coord timed events Jonas Thörnvall <jonas.thornvall@gmail.com> - 2021-06-20 23:48 -0700
            Re: Coord timed events Jonas Thörnvall <jonas.thornvall@gmail.com> - 2021-06-23 12:11 -0700

csiph-web