Discuss Scratch

MESYETI
Scratcher
100+ posts

Seconds since 1970

I know about:
(days since 2000)
this is a very useful feature, but computers use seconds since 1970..not days since 2000
So can
(seconds since 1970)
be added? It will be even more useful!
Peaceful_Dork
Scratcher
100+ posts

Seconds since 1970

Could you please give some examples on how this could be used? I don't see how it would be useful.
ThatOneWeirdDude
Scratcher
1000+ posts

Seconds since 1970

Not many use the days since 2000 block anyways, so no support as this isn't that useful.
fdreerf
Scratcher
1000+ posts

Seconds since 1970

(((days since 2000) - (10957.2657)) * (31556925.216)
MESYETI
Scratcher
100+ posts

Seconds since 1970

Peaceful_Dork wrote:

Could you please give some examples on how this could be used? I don't see how it would be useful.
It can be used for scratch virtual machines, for example, you'll need some way to have the computer know the date and time.. So seconds since 1970 is very good for this purpose! ALL computers have it!
MESYETI
Scratcher
100+ posts

Seconds since 1970

fdreerf wrote:

(((days since 2000) - (10957.2657)) * (31556925.216)
Sorry, but days since 2000 doesn't update every second, so that won't work..

Last edited by MESYETI (April 18, 2020 18:50:20)

fdreerf
Scratcher
1000+ posts

Seconds since 1970

MESYETI wrote:

Peaceful_Dork wrote:

Could you please give some examples on how this could be used? I don't see how it would be useful.
It can be used for scratch virtual machines, for example, you'll need some way to have the computer know the date and time.. So seconds since 1970 is very good for this purpose! ALL computers have it!
(days since 2000) // allow me to introduce myself
MESYETI
Scratcher
100+ posts

Seconds since 1970

fdreerf wrote:

MESYETI wrote:

Peaceful_Dork wrote:

Could you please give some examples on how this could be used? I don't see how it would be useful.
It can be used for scratch virtual machines, for example, you'll need some way to have the computer know the date and time.. So seconds since 1970 is very good for this purpose! ALL computers have it!
(days since 2000) // allow me to introduce myself
That can't tell time
fdreerf
Scratcher
1000+ posts

Seconds since 1970

MESYETI wrote:

That can't tell time
It has twelve digits of precision.
Not only can it tell time, but better than any other block in Scratch.
MESYETI
Scratcher
100+ posts

Seconds since 1970

fdreerf wrote:

MESYETI wrote:

That can't tell time
It has twelve digits of precision.
Not only can it tell time, but better than any other block in Scratch.
It doesn't update every second, and 1970 is a better time..
Botcho_Otkho
Scratcher
1000+ posts

Seconds since 1970

MESYETI wrote:

It doesn't update every second, and 1970 is a better time..
It does update every second: it returns the amount of days with decimals. And also, 1970 is subjectively a better time, because to me it actually represents nothing.
MESYETI
Scratcher
100+ posts

Seconds since 1970

Botcho_Otkho wrote:

MESYETI wrote:

It doesn't update every second, and 1970 is a better time..
It does update every second: it returns the amount of days with decimals. And also, 1970 is subjectively a better time, because to me it actually represents nothing.
Yes, I've seen it in decimals. I've seen it not update every second

Let me try again..
SpideyPlaysMC
Scratcher
500+ posts

Seconds since 1970

Okay, put the days since 2000 block inside a variable block (stack type, not circle). Put it inside a forever loop, show the variable, and run the script. It updates every second.

Last edited by SpideyPlaysMC (April 18, 2020 19:03:19)

MESYETI
Scratcher
100+ posts

Seconds since 1970

SpideyPlaysMC wrote:

Okay, put the days since 2000 block inside a variable block (stack type). Put it inside a forever loop, show the variable, and run the script. It updates every second.
I shared a project showing that it does not update every second
SpideyPlaysMC
Scratcher
500+ posts

Seconds since 1970

Do you want your block to update EXACTLY every second?
MESYETI
Scratcher
100+ posts

Seconds since 1970

SpideyPlaysMC wrote:

Do you want your block to update EXACTLY every second?
Yes
Botcho_Otkho
Scratcher
1000+ posts

Seconds since 1970

MESYETI wrote:

SpideyPlaysMC wrote:

Do you want your block to update EXACTLY every second?
Yes
If you mean that it takes more that 1 second to update, it's because the “say” block rounds up decimal numbers. If you click the “days since 2000” in the editor, you'll see that it takes even less than 1 second to update.
SpideyPlaysMC
Scratcher
500+ posts

Seconds since 1970

There is a block that can detect seconds in the sensing section:
(current [second v])
Also you can just estimate that it's been 1,576,800,000 seconds since 1970.
MESYETI
Scratcher
100+ posts

Seconds since 1970

SpideyPlaysMC wrote:

There is a block that can detect seconds in the sensing section:
(current [second v])
Also you can just estimate that it's been 1,576,800,000 seconds since 1970.
No, I don't like current seconds

And yes, I have found that days since 2000 updates less than every second.. Sorry for bothering you..
SpideyPlaysMC
Scratcher
500+ posts

Seconds since 1970

No it's fine.

Powered by DjangoBB