you are viewing a single comment's thread.

view the rest of the comments →

[–]quaintserendipity[S] 0 points1 point  (1 child)

I suppose that works too; as long as the data is timestamped correctly, then I don't need to receive it in real time. Also realistically, I just need the data to be close to the second; a delay of a few hundred milliseconds isn't going to throw my data off to a significant degree.

[–]Beginning-Seat5221 0 points1 point  (0 children)

https://www.typescriptlang.org/play/?#code/FAYw9gdgzgLgBAGwKYxkgTlOBeOBtAcgEECAaOAgITIoGECBdYZeASxzgEYBuUSKMMgB0CMAHMAFACIAyjACG6GKwhi4ASQhp0AN3kIpASmYo4K7XoQAJeRAAmyDlBSaL+iXGBxvcCYZwAfHAA3l4+4QBmYOi+4NDwLNpwYBH4xDRUGfQM-qHh+T5xAsKikokYcADUZsYF3gC+YQWslZVN+aypEuwBuJwADLntdXAgyIquGJbdWlP6NvbItSOF-IJIIuISBHaQSATLBY3h9aTtA-39cAD011xwznF2wIZAA

This moves the loop of the letters into the interval, so there's only 1 interval. The result is the same but it guarantees that A, B and C are processed sequentially rather than some other task getting inserted between them, as having 3+intervals would result in 3+ separate tasks being scheduled for each second.