Discuss Scratch

aking_
Scratcher
1000+ posts

Current millisecond

No support, I don't see a use for this.
Charles12310
Scratcher
1000+ posts

Current millisecond

Hmm, semi-support, since a millisecond is 1/1000 of a second, and you could just do:

wait ((0.001) * (amount you want)) secs

FancyFoxy wrote:

Auroura_Wolf wrote:

Does it?
forever
wait (0.001) secs
change [timer v] by (0.001)
end
Is that milliseconds? It should be, right, it's 1 thousandth of a second?
You can't wait for 0.001 seconds. Lowest is 0.03333333333… seconds.
This is not exact. Due to a short wait in the variable block, the timer will be different than the actual timer, it is not 100% reliable to use. Many people think that this is a workaround for timers:

when green flag clicked
set [timer v] to [0]
forever
wait (0.1) secs
change [timer v] by (0.1)
end

It isn't.

alexphan wrote:

Botcho_Otkho wrote:

No support.
((current [second v]) / (1000))
That wouldn't work. That's just dividing the second (a whole number) by 1000.

_

Galleigo-Labs wrote:

Why would you need to measure the system's millisecond time?

No support.
The let's remove
(current [ v])
because what's the point of measuring the system's second, or minute, or hour?

_

Support; even though the workaround can be figured out after some time, it would be nice to have a millisecond block that does not lag (the timer, if I'm correct, is based on FPS, so it varies among users. The days since 2000 block and current block is based on real time, so it goes at a constant rate)

Exactly, if we can't have millisecond, why do we have the other time?

If we can't have the “previous costume” block, because it can be easily replicated, why do we have the “next costume” block, which is also easily replicated? See what I mean?
DaEpikDude
Scratcher
1000+ posts

Current millisecond

Charles12310 wrote:

Hmm, semi-support, since a millisecond is 1/1000 of a second, and you could just do:

wait ((0.001) * (amount you want)) secs
What exactly does this do as a workaround? I'm not sure how this workarounds finding the current millisecond.

Charles12310 wrote:

alexphan wrote:

-snip-

Exactly, if we can't have millisecond, why do we have the other time?
Because the other times are generally more used than milliseconds, and we have the timer for milliseconds?

Charles12310 wrote:

If we can't have the “previous costume” block, because it can be easily replicated, why do we have the “next costume” block, which is also easily replicated? See what I mean?
Hoo boy, the workaround discussion again.
In relation to that specific case, in animations and such you're vastly more likely to be moving forwards through frames than moving backwards.

Anyway, in relation to the OP, there isn't much reason to not adding this.
However…

geoffrey1900 wrote:

if you think about it the
(timer) 
has to run with the fps of the your computer so and most of the time the fps of computers is 30 or 60 so
how could it show a 1000 of a second if it can only run at 1 frame every 30 or 60 seconds?
Semi-support.
Charles12310
Scratcher
1000+ posts

Current millisecond

DaEpikDude wrote:

Charles12310 wrote:

Hmm, semi-support, since a millisecond is 1/1000 of a second, and you could just do:

wait ((0.001) * (amount you want)) secs
What exactly does this do as a workaround? I'm not sure how this workarounds finding the current millisecond.

Charles12310 wrote:

alexphan wrote:

-snip-

Exactly, if we can't have millisecond, why do we have the other time?
Because the other times are generally more used than milliseconds, and we have the timer for milliseconds?

Charles12310 wrote:

If we can't have the “previous costume” block, because it can be easily replicated, why do we have the “next costume” block, which is also easily replicated? See what I mean?
Hoo boy, the workaround discussion again.
In relation to that specific case, in animations and such you're vastly more likely to be moving forwards through frames than moving backwards.

Anyway, in relation to the OP, there isn't much reason to not adding this.
However…

geoffrey1900 wrote:

if you think about it the
(timer) 
has to run with the fps of the your computer so and most of the time the fps of computers is 30 or 60 so
how could it show a 1000 of a second if it can only run at 1 frame every 30 or 60 seconds?
Semi-support.
1. Isn't a millisecond 0.001 of a second? Mis-read OP, but I'm sure it could be replicated with:
((current [second v]) * (0.001))
2. Well, we would never know what it could be used unless it came! I mean, I wouldn't have to have to keep on putting zeros and decimal points on a wait, neither would I have no wait block because then events would happen to quickly, but I don't want them to happen slowly do I? In fact, this might not be enough for me:
wait (0.1) secs
3. I mean, sure, but sometimes there might be slides of switching back and forth. And there is a previous backdrop block, but it's in the switch backdrop to block, including the next backdrop block, even though another block exists, which confuses me.
4. Exactly.
Lu2333
Scratcher
100+ posts

Current millisecond

This Seems A Bit Too Complicated For Scratch.
FancyFoxy
Scratcher
500+ posts

Current millisecond

Lu2333 wrote:

This Seems A Bit Too Complicated For Scratch.
…how?
DisasterPug
Scratcher
100+ posts

Current millisecond

Lu2333 wrote:

This Seems A Bit Too Complicated For Scratch.
So we should remove
([ v] of (9) :: operators
because it's too complicated?

Last edited by DisasterPug (Oct. 1, 2017 17:42:14)

walkcycle
Scratcher
500+ posts

Current millisecond

A round

( letter (5) of ( join ( (timer) - ( [floor v] of (timer) ) ) [ ] ) ) // use in a "run without screen refresh" block

works for milliseconds.

DisasterPug wrote:

So we should remove
([ v] of (9) :: operators
because it's too complicated?
The standard for adding something to Scratch is different from the standard for removing something from Scratch.

And the math operators are more useful than a millisecond reporter, imo.

Last edited by walkcycle (Oct. 2, 2017 16:09:07)

kenny2scratch
Scratcher
500+ posts

Current millisecond

define get current millisecond
set [current millisecond v] to ((((days since 2000) * (86400)) - ([floor v] of ((days since 2000) * (86400)))) * (1000))
Enjoy!
walkcycle
Scratcher
500+ posts

Current millisecond

^ For those wondering, the 86400 number is the seconds in a day.

((24) * ((60) * (60))) // (24 hours in a day) * (60 minutes in an hour) * (60 seconds in a minute)

So,

((days since 2000) * (86400)) // (days since 2000) * (seconds in a day)

is the seconds since 2000.

Then subtracting the floor gets the current fraction of a second.

And multiplying by 1000 gets the deci-, centi-, and milli- seconds in front of the decimal mark.

And our thread is was a duplicate. It got combined.

Last edited by walkcycle (Oct. 2, 2017 22:26:05)

Charles12310
Scratcher
1000+ posts

Current millisecond

walkcycle wrote:

^ For those wondering, the 86400 number is the seconds in a day.

((24) * ((60) * (60))) // (24 hours in a day) * (60 minutes in an hour) * (60 seconds in a minute)

So,

((days since 2000) * (86400)) // (days since 2000) * (seconds in a day)

is the seconds since 2000.

Then subtracting the floor gets the current fraction of a second.

And multiplying by 1000 gets the deci-, centi-, and milli- seconds in front of the decimal mark.

And our thread is was a duplicate. It got combined.
All you are doing is just linking to the front page of this topic.
walkcycle
Scratcher
500+ posts

Current millisecond

Charles12310 wrote:

All you are doing is just linking to the front page of this topic.
was a duplicate.
It got combined.
walkcycle
Scratcher
500+ posts

Current millisecond

What about a

(current [fraction of second v])

or

(current [subsecond v])

block? Then it would be easy to get the parts of a second on the clock.
tazz4843
Scratcher
100+ posts

Current millisecond

Alright, this should be added to Scratch 3. Come on, ST!
PrincessFlowerTV
Scratcher
1000+ posts

Current millisecond

tazz4843 wrote:

Alright, this should be added to Scratch 3. Come on, ST!
Necroposter!
JK, you can't necropost in suggestions.

No support- wouldn't be used a lot, and workaroundable.
CCPlymJoe
Scratcher
100+ posts

Current millisecond

PrincessFlowerTV wrote:

tazz4843 wrote:

Alright, this should be added to Scratch 3. Come on, ST!
Necroposter!
JK, you can't necropost in suggestions.

No support- wouldn't be used a lot, and workaroundable.
Workaroundable? How?
PrincessFlowerTV
Scratcher
1000+ posts

Current millisecond

CCPlymJoe wrote:

PrincessFlowerTV wrote:

tazz4843 wrote:

Alright, this should be added to Scratch 3. Come on, ST!
Necroposter!
JK, you can't necropost in suggestions.

No support- wouldn't be used a lot, and workaroundable.
Workaroundable? How?
((0.001) * (amount you want))
mystery4000
Scratcher
100+ posts

Current millisecond

Cant you just use timer blocks, I thought those went down a good amount of decimal places?
CCPlymJoe
Scratcher
100+ posts

Current millisecond

PrincessFlowerTV wrote:

CCPlymJoe wrote:

PrincessFlowerTV wrote:

tazz4843 wrote:

Alright, this should be added to Scratch 3. Come on, ST!
Necroposter!
JK, you can't necropost in suggestions.

No support- wouldn't be used a lot, and workaroundable.
Workaroundable? How?
((0.001) * (amount you want))
Inaccurate.
kenny2scratch
Scratcher
500+ posts

Current millisecond

CCPlymJoe wrote:

PrincessFlowerTV wrote:

tazz4843 wrote:

Alright, this should be added to Scratch 3. Come on, ST!
Necroposter!
JK, you can't necropost in suggestions.

No support- wouldn't be used a lot, and workaroundable.
Workaroundable? How?

kenny2scratch wrote:

define get current millisecond
set [current millisecond v] to ((((days since 2000) * (86400)) - ([floor v] of ((days since 2000) * (86400)))) * (1000))
Enjoy!

Powered by DjangoBB