# UIKit Dynamics - Replacing Animations | raywenderlich.com

**URL:** <https://forums.kodeco.com/t/uikit-dynamics-replacing-animations-raywenderlich-com/56626>\
**Category:** 🎓 Courses & Articles\
**Created:** [November 29, 2018, 8:49pm UTC](https://forums.kodeco.com/t/uikit-dynamics-replacing-animations-raywenderlich-com/56626 "2018-11-29T20:49:20Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![hococoder](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/hococoder/32/110162_2.png) [@hococoder](https://forums.kodeco.com/u/hococoder)\
**Post date:** [November 29, 2018, 8:49pm UTC](https://forums.kodeco.com/t/uikit-dynamics-replacing-animations-raywenderlich-com/56626/1 "2018-11-29T20:49:20Z")

</div>

* * *
This is a companion discussion topic for the original entry at [https://www.raywenderlich.com/9238-uikit-dynamics-replacing-animations](https://www.raywenderlich.com/9238-uikit-dynamics-replacing-animations)

---

<div class="post-metadata">

**Author:** ![aaronmhr](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/aaronmhr/32/79544_2.png) [@aaronmhr](https://forums.kodeco.com/u/aaronmhr)\
**Post date:** [December 5, 2018, 10:49am UTC](https://forums.kodeco.com/t/uikit-dynamics-replacing-animations-raywenderlich-com/56626/2 "2018-12-05T10:49:41Z")

</div>

What does `NSEC_PER_SEC` means? and why are you using it in  
`let delayTime = DispatchTime.now() + Double(Int64(0.75 * Double(NSEC_PER_SEC)))/Double(NSEC_PER_SEC)`?  
Wouldn’t we achieve the same with: `let delayTime = DispatchTime.now() + 0.75`

Thanks

---

<div class="post-metadata">

**Author:** ![shogunkaramazov](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/shogunkaramazov/32/108826_2.png) [@shogunkaramazov](https://forums.kodeco.com/u/shogunkaramazov)\
**Post date:** [January 9, 2019, 6:02pm UTC](https://forums.kodeco.com/t/uikit-dynamics-replacing-animations-raywenderlich-com/56626/3 "2019-01-09T18:02:29Z")

</div>

@hococoder Can you please help with this when you get a chance? Thank you - much appreciated! :]

---

<div class="post-metadata">

**Author:** ![hococoder](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/hococoder/32/110162_2.png) [@hococoder](https://forums.kodeco.com/u/hococoder)\
**Post date:** [January 15, 2019, 1:28am UTC](https://forums.kodeco.com/t/uikit-dynamics-replacing-animations-raywenderlich-com/56626/4 "2019-01-15T01:28:25Z")

</div>

That’s a great catch! It is much simpler in Swift 4, and that’s something I missed while getting the code ready. You can now do

`let delayTime = .now() + 0.75`

since there is a built in override of “+” operator that takes in a DispatchTime on one side and a double on the other.

You can also be specific with milliseconds or nanoseconds:

```
let delayTime = .now() + .milliseconds(500)

let delayTime2 = .now() + .nanoseconds(999)

```

Thanks for watching the screencast, and thanks for the question!
