Block Idea: The Wait till Time Block

A feature I’d like to see in Hopscotch is:

The Wait till Time block

I’d use it for this type of project:

Are you patient projects and alarm clocks

Here is an example design I’ve made:


(P.S. im bad at drawing stuff xd)

I’ve seen something similar in another programming languages, it looks like this:

import datetime
import time

target_time = datetime.datetime(2017, 3, 7, 3)  # 3 am on 3 July 2017
while datetime.datetime.now() < target_time:
    time.sleep(10)
print('It is 3am, now running the rest of the code')
7 Likes

Not sure why I would use this but still a noice idea
And first post :)

3 Likes

yes congrats at the first post :)

2 Likes

I’m not entirely sure what I’d use this for, but I’m sure it could be very useful to someone who needs it. There’s actually a way to do this, but it’s pretty complicated.

4 Likes

Actually did someone used the complex way for waiting till time?

3 Likes

I don’t think so.
You find the timestamp with the hidden wait til timestamp block
Then you have to make a repeat when thing: when timestamp = the timestamp of the time you need to wait until
Then you put the code in it.

3 Likes

It’s a hidden block, like EG said.

2 Likes

I just dont know how to get the exact timestamp ;-;

1 Like

Is it in one of awesome_e’s secret blocks?

1 Like

It’s kinda easy:
Fundardo has a project on that.
https://c.gethopscotch.com/p/10lc8k6k61 is the link
You need AE’s shortcut tho

3 Likes

Yeah you can use AE’s shortcut for that

1 Like

Petrichor has one as well.
Give me a min to grab the link.

2 Likes

Commonly forgotten about is the live secret blocks draft:
https://c.gethopscotch.com/p/bl

Just publish and unpublish that

4 Likes

COAN had it first with his clock, and I have a countdown template. All of these use the time stamp block.

3 Likes

I just noticed this:


There was no you have ____ projects left thingy
dun dun duuuuuun
(I didn’t subscribed yet)

2 Likes

Hmm I didn’t even know that existed until now lol.

4 Likes

I’m pretty sure i won’t use this, but anything new is cool.

2 Likes

view: wait until time stamp

I’d like to see wait until time stamp actually implemented though

3 Likes

Me too :)

3 Likes

And this is something where I’d probably actually prefer seconds over ms :P

4 Likes