# Workflow.currentTimeMillis() typescript SDK

**URL:** <https://community.temporal.io/t/workflow-currenttimemillis-typescript-sdk/5297>\
**Category:** Community Support\
**Tags:** typescript-sdk\
**Created:** [July 12, 2022, 11:27am UTC](https://community.temporal.io/t/workflow-currenttimemillis-typescript-sdk/5297 "2022-07-12T11:27:39Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Yuval](https://sea2.discourse-cdn.com/flex016/user_avatar/community.temporal.io/yuval/32/2439_2.png) [@Yuval](https://community.temporal.io/u/Yuval)\
**Post date:** [July 12, 2022, 11:27am UTC](https://community.temporal.io/t/workflow-currenttimemillis-typescript-sdk/5297/1 "2022-07-12T11:27:39Z")

</div>

Hello  
I’m using continueAsNew mechanism for running my workflow over and over, with sleep for 1 day.  
In my workflow, I’m waiting for an external signal sent outside the workflow.  
I want to rerun the workflow after 1 day, including the time waiting for the signal.  
So I was thinking about using Date().getTime() at the beginning of the workflow, and just before sleeping, to calculate the amount of time it needs to sleep, but it violates the determinism concept.  
I was looking for alternatives and encountered Java’s SDK’s Workflow.currentTimeMillis() [workflow-determinism](https://community.temporal.io/t/workflow-determinism/4027), but it doesn’t appear to be found in typescript’s SDK

What could solve my problem?  
Thanks

---

<div class="post-metadata">

**Author:** ![bergundy](https://sea2.discourse-cdn.com/flex016/user_avatar/community.temporal.io/bergundy/32/900_2.png) [@bergundy](https://community.temporal.io/u/bergundy)\
**Post date:** [July 12, 2022, 11:34am UTC](https://community.temporal.io/t/workflow-currenttimemillis-typescript-sdk/5297/2 "2022-07-12T11:34:40Z")

</div>

You can use Date.getTime() in TypeScript.  
TypeScript workflows run in a sandbox where all of the non-deterministic APIs are replaced with safe alternatives.

> **[Determinism in Workflows | Temporal Documentation](https://docs.temporal.io/typescript/determinism/)**
>
> Temporal Workflows are executed differently than conventional code as they can be restored at any point.
