Question. What is proper way of making delay of `startClock` ?
See original GitHub issueI have a following logic
const restartAnimation = (
) => [
stopClock(clock),
set(state.finished, 0),
set(state.position, 0),
set(state.time, 0),
set(state.frameTime, 0),
set(config.toValue, toValue),
set(config.duration, duration),
startClock(clock)
];
return block([
//somthing...
timing(clock, state, config),
cond(shouldRestartAnimation, [restartAnimation()]
//something else
])
I want to delay startClock
in restartAnimation
. What is proper way of doing it with reanimated?
ps. thanks for great library
Issue Analytics
- State:
- Created 4 years ago
- Reactions:1
- Comments:8 (6 by maintainers)
Top Results From Across the Web
implement time delay in c
By the way, this assumes time() returns a 1-second resolution value. ... #include <time.h> void delay(double dly){ /* save start clock tick ...
Read more >Clock Question - The Huddle
Team A gets a false start, clock stops, ball is reset. ... It is a good way to eat clock if the other...
Read more >How can I delay my period?
There's no guaranteed way to delay your period, but it may be possible if you take the combined contraceptive pill.
Read more >Using the Delay Start Function of your Dishwasher
Delay Start button. If you would like to cancel and drain a cycle, press and hold the Start button for 3 seconds.
Read more >Why Is My Period Late? 8 Possible Reasons
Cysts form on the ovaries as a result of this hormone imbalance. This can make ovulation irregular or stop it altogether. Other hormones,...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hi @punksta,
this issue is quite old, so I’m closing it.
Solutions provided by @brmenchl and @satya164 should answer your question, additionally, you can try using
delay
from redashIf this doesn’t help, please comment.
Given a modified implementation of
delay
in https://github.com/kmagiera/react-native-reanimated/pull/71 that can be reset:I haven’t tested this, but it’s based on something that I have working in my app.